Skip to content

fix(types): correct type for vector store chunking strategy #2017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ from openai.types.beta import (
OtherFileChunkingStrategyObject,
StaticFileChunkingStrategy,
StaticFileChunkingStrategyObject,
StaticFileChunkingStrategyParam,
StaticFileChunkingStrategyObjectParam,
VectorStore,
VectorStoreDeleted,
)
Expand Down
3 changes: 3 additions & 0 deletions src/openai/types/beta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@
from .assistant_response_format_option_param import (
AssistantResponseFormatOptionParam as AssistantResponseFormatOptionParam,
)
from .static_file_chunking_strategy_object_param import (
StaticFileChunkingStrategyObjectParam as StaticFileChunkingStrategyObjectParam,
)
4 changes: 2 additions & 2 deletions src/openai/types/beta/file_chunking_strategy_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from typing_extensions import TypeAlias

from .auto_file_chunking_strategy_param import AutoFileChunkingStrategyParam
from .static_file_chunking_strategy_param import StaticFileChunkingStrategyParam
from .static_file_chunking_strategy_object_param import StaticFileChunkingStrategyObjectParam

__all__ = ["FileChunkingStrategyParam"]

FileChunkingStrategyParam: TypeAlias = Union[AutoFileChunkingStrategyParam, StaticFileChunkingStrategyParam]
FileChunkingStrategyParam: TypeAlias = Union[AutoFileChunkingStrategyParam, StaticFileChunkingStrategyObjectParam]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal, Required, TypedDict

from .static_file_chunking_strategy_param import StaticFileChunkingStrategyParam

__all__ = ["StaticFileChunkingStrategyObjectParam"]


class StaticFileChunkingStrategyObjectParam(TypedDict, total=False):
static: Required[StaticFileChunkingStrategyParam]

type: Required[Literal["static"]]
"""Always `static`."""