Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__init__.py +46 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/image_file_content_block_param.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/image_url_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/image_url_param.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/message_create_params.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/refusal_delta_block.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/run_list_params.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/run_update_params.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/text_content_block.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/text_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/text_delta_block.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/annotation_delta.py +14 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/file_citation_annotation.py +26 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/file_citation_delta_annotation.py +33 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/image_file_content_block.py +15 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/image_file_content_block_param.py +16 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/image_file_delta.py +23 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/image_url.py +23 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/image_url_content_block_param.py +16 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/message_content_delta.py +17 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/message_create_params.py +55 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/message_deleted.py +15 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/message_delta_event.py +19 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/message_list_params.py +42 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/message_update_params.py +24 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/refusal_content_block.py +14 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/required_action_function_tool_call.py +34 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/run.py +245 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/run_create_params.py +251 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/run_list_params.py +39 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/run_update_params.py +24 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__init__.py +24 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/__init__.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_logs.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_output_image.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_tool_call_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/file_search_tool_call.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/file_search_tool_call_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/function_tool_call.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/function_tool_call_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/message_creation_step_details.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_delta_event.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_delta_message_delta.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_include.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/step_list_params.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/step_retrieve_params.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/tool_call.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/tool_call_delta.cpython-311.pyc +0 -0
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__init__.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from .run import Run as Run
|
| 6 |
+
from .text import Text as Text
|
| 7 |
+
from .message import Message as Message
|
| 8 |
+
from .image_url import ImageURL as ImageURL
|
| 9 |
+
from .annotation import Annotation as Annotation
|
| 10 |
+
from .image_file import ImageFile as ImageFile
|
| 11 |
+
from .run_status import RunStatus as RunStatus
|
| 12 |
+
from .text_delta import TextDelta as TextDelta
|
| 13 |
+
from .message_delta import MessageDelta as MessageDelta
|
| 14 |
+
from .image_url_delta import ImageURLDelta as ImageURLDelta
|
| 15 |
+
from .image_url_param import ImageURLParam as ImageURLParam
|
| 16 |
+
from .message_content import MessageContent as MessageContent
|
| 17 |
+
from .message_deleted import MessageDeleted as MessageDeleted
|
| 18 |
+
from .run_list_params import RunListParams as RunListParams
|
| 19 |
+
from .annotation_delta import AnnotationDelta as AnnotationDelta
|
| 20 |
+
from .image_file_delta import ImageFileDelta as ImageFileDelta
|
| 21 |
+
from .image_file_param import ImageFileParam as ImageFileParam
|
| 22 |
+
from .text_delta_block import TextDeltaBlock as TextDeltaBlock
|
| 23 |
+
from .run_create_params import RunCreateParams as RunCreateParams
|
| 24 |
+
from .run_update_params import RunUpdateParams as RunUpdateParams
|
| 25 |
+
from .text_content_block import TextContentBlock as TextContentBlock
|
| 26 |
+
from .message_delta_event import MessageDeltaEvent as MessageDeltaEvent
|
| 27 |
+
from .message_list_params import MessageListParams as MessageListParams
|
| 28 |
+
from .refusal_delta_block import RefusalDeltaBlock as RefusalDeltaBlock
|
| 29 |
+
from .file_path_annotation import FilePathAnnotation as FilePathAnnotation
|
| 30 |
+
from .image_url_delta_block import ImageURLDeltaBlock as ImageURLDeltaBlock
|
| 31 |
+
from .message_content_delta import MessageContentDelta as MessageContentDelta
|
| 32 |
+
from .message_create_params import MessageCreateParams as MessageCreateParams
|
| 33 |
+
from .message_update_params import MessageUpdateParams as MessageUpdateParams
|
| 34 |
+
from .refusal_content_block import RefusalContentBlock as RefusalContentBlock
|
| 35 |
+
from .image_file_delta_block import ImageFileDeltaBlock as ImageFileDeltaBlock
|
| 36 |
+
from .image_url_content_block import ImageURLContentBlock as ImageURLContentBlock
|
| 37 |
+
from .file_citation_annotation import FileCitationAnnotation as FileCitationAnnotation
|
| 38 |
+
from .image_file_content_block import ImageFileContentBlock as ImageFileContentBlock
|
| 39 |
+
from .text_content_block_param import TextContentBlockParam as TextContentBlockParam
|
| 40 |
+
from .file_path_delta_annotation import FilePathDeltaAnnotation as FilePathDeltaAnnotation
|
| 41 |
+
from .message_content_part_param import MessageContentPartParam as MessageContentPartParam
|
| 42 |
+
from .image_url_content_block_param import ImageURLContentBlockParam as ImageURLContentBlockParam
|
| 43 |
+
from .file_citation_delta_annotation import FileCitationDeltaAnnotation as FileCitationDeltaAnnotation
|
| 44 |
+
from .image_file_content_block_param import ImageFileContentBlockParam as ImageFileContentBlockParam
|
| 45 |
+
from .run_submit_tool_outputs_params import RunSubmitToolOutputsParams as RunSubmitToolOutputsParams
|
| 46 |
+
from .required_action_function_tool_call import RequiredActionFunctionToolCall as RequiredActionFunctionToolCall
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/image_file_content_block_param.cpython-311.pyc
ADDED
|
Binary file (908 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/image_url_delta.cpython-311.pyc
ADDED
|
Binary file (847 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/image_url_param.cpython-311.pyc
ADDED
|
Binary file (800 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/message_create_params.cpython-311.pyc
ADDED
|
Binary file (2.1 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/refusal_delta_block.cpython-311.pyc
ADDED
|
Binary file (835 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/run_list_params.cpython-311.pyc
ADDED
|
Binary file (831 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/run_update_params.cpython-311.pyc
ADDED
|
Binary file (898 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/text_content_block.cpython-311.pyc
ADDED
|
Binary file (749 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/text_delta.cpython-311.pyc
ADDED
|
Binary file (849 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/__pycache__/text_delta_block.cpython-311.pyc
ADDED
|
Binary file (891 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/annotation_delta.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Union
|
| 4 |
+
from typing_extensions import Annotated, TypeAlias
|
| 5 |
+
|
| 6 |
+
from ...._utils import PropertyInfo
|
| 7 |
+
from .file_path_delta_annotation import FilePathDeltaAnnotation
|
| 8 |
+
from .file_citation_delta_annotation import FileCitationDeltaAnnotation
|
| 9 |
+
|
| 10 |
+
__all__ = ["AnnotationDelta"]
|
| 11 |
+
|
| 12 |
+
AnnotationDelta: TypeAlias = Annotated[
|
| 13 |
+
Union[FileCitationDeltaAnnotation, FilePathDeltaAnnotation], PropertyInfo(discriminator="type")
|
| 14 |
+
]
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/file_citation_annotation.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["FileCitationAnnotation", "FileCitation"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class FileCitation(BaseModel):
|
| 11 |
+
file_id: str
|
| 12 |
+
"""The ID of the specific File the citation is from."""
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class FileCitationAnnotation(BaseModel):
|
| 16 |
+
end_index: int
|
| 17 |
+
|
| 18 |
+
file_citation: FileCitation
|
| 19 |
+
|
| 20 |
+
start_index: int
|
| 21 |
+
|
| 22 |
+
text: str
|
| 23 |
+
"""The text in the message content that needs to be replaced."""
|
| 24 |
+
|
| 25 |
+
type: Literal["file_citation"]
|
| 26 |
+
"""Always `file_citation`."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/file_citation_delta_annotation.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ...._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["FileCitationDeltaAnnotation", "FileCitation"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class FileCitation(BaseModel):
|
| 12 |
+
file_id: Optional[str] = None
|
| 13 |
+
"""The ID of the specific File the citation is from."""
|
| 14 |
+
|
| 15 |
+
quote: Optional[str] = None
|
| 16 |
+
"""The specific quote in the file."""
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class FileCitationDeltaAnnotation(BaseModel):
|
| 20 |
+
index: int
|
| 21 |
+
"""The index of the annotation in the text content part."""
|
| 22 |
+
|
| 23 |
+
type: Literal["file_citation"]
|
| 24 |
+
"""Always `file_citation`."""
|
| 25 |
+
|
| 26 |
+
end_index: Optional[int] = None
|
| 27 |
+
|
| 28 |
+
file_citation: Optional[FileCitation] = None
|
| 29 |
+
|
| 30 |
+
start_index: Optional[int] = None
|
| 31 |
+
|
| 32 |
+
text: Optional[str] = None
|
| 33 |
+
"""The text in the message content that needs to be replaced."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/image_file_content_block.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
from .image_file import ImageFile
|
| 7 |
+
|
| 8 |
+
__all__ = ["ImageFileContentBlock"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ImageFileContentBlock(BaseModel):
|
| 12 |
+
image_file: ImageFile
|
| 13 |
+
|
| 14 |
+
type: Literal["image_file"]
|
| 15 |
+
"""Always `image_file`."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/image_file_content_block_param.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
from .image_file_param import ImageFileParam
|
| 8 |
+
|
| 9 |
+
__all__ = ["ImageFileContentBlockParam"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class ImageFileContentBlockParam(TypedDict, total=False):
|
| 13 |
+
image_file: Required[ImageFileParam]
|
| 14 |
+
|
| 15 |
+
type: Required[Literal["image_file"]]
|
| 16 |
+
"""Always `image_file`."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/image_file_delta.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ...._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["ImageFileDelta"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ImageFileDelta(BaseModel):
|
| 12 |
+
detail: Optional[Literal["auto", "low", "high"]] = None
|
| 13 |
+
"""Specifies the detail level of the image if specified by the user.
|
| 14 |
+
|
| 15 |
+
`low` uses fewer tokens, you can opt in to high resolution using `high`.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
file_id: Optional[str] = None
|
| 19 |
+
"""
|
| 20 |
+
The [File](https://platform.openai.com/docs/api-reference/files) ID of the image
|
| 21 |
+
in the message content. Set `purpose="vision"` when uploading the File if you
|
| 22 |
+
need to later display the file content.
|
| 23 |
+
"""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/image_url.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ...._models import BaseModel
|
| 7 |
+
|
| 8 |
+
__all__ = ["ImageURL"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class ImageURL(BaseModel):
|
| 12 |
+
url: str
|
| 13 |
+
"""
|
| 14 |
+
The external URL of the image, must be a supported image types: jpeg, jpg, png,
|
| 15 |
+
gif, webp.
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
detail: Optional[Literal["auto", "low", "high"]] = None
|
| 19 |
+
"""Specifies the detail level of the image.
|
| 20 |
+
|
| 21 |
+
`low` uses fewer tokens, you can opt in to high resolution using `high`. Default
|
| 22 |
+
value is `auto`
|
| 23 |
+
"""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/image_url_content_block_param.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
from .image_url_param import ImageURLParam
|
| 8 |
+
|
| 9 |
+
__all__ = ["ImageURLContentBlockParam"]
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class ImageURLContentBlockParam(TypedDict, total=False):
|
| 13 |
+
image_url: Required[ImageURLParam]
|
| 14 |
+
|
| 15 |
+
type: Required[Literal["image_url"]]
|
| 16 |
+
"""The type of the content part."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/message_content_delta.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import Union
|
| 4 |
+
from typing_extensions import Annotated, TypeAlias
|
| 5 |
+
|
| 6 |
+
from ...._utils import PropertyInfo
|
| 7 |
+
from .text_delta_block import TextDeltaBlock
|
| 8 |
+
from .refusal_delta_block import RefusalDeltaBlock
|
| 9 |
+
from .image_url_delta_block import ImageURLDeltaBlock
|
| 10 |
+
from .image_file_delta_block import ImageFileDeltaBlock
|
| 11 |
+
|
| 12 |
+
__all__ = ["MessageContentDelta"]
|
| 13 |
+
|
| 14 |
+
MessageContentDelta: TypeAlias = Annotated[
|
| 15 |
+
Union[ImageFileDeltaBlock, TextDeltaBlock, RefusalDeltaBlock, ImageURLDeltaBlock],
|
| 16 |
+
PropertyInfo(discriminator="type"),
|
| 17 |
+
]
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/message_create_params.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union, Iterable, Optional
|
| 6 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 7 |
+
|
| 8 |
+
from ...shared_params.metadata import Metadata
|
| 9 |
+
from .message_content_part_param import MessageContentPartParam
|
| 10 |
+
from ..code_interpreter_tool_param import CodeInterpreterToolParam
|
| 11 |
+
|
| 12 |
+
__all__ = ["MessageCreateParams", "Attachment", "AttachmentTool", "AttachmentToolFileSearch"]
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class MessageCreateParams(TypedDict, total=False):
|
| 16 |
+
content: Required[Union[str, Iterable[MessageContentPartParam]]]
|
| 17 |
+
"""The text contents of the message."""
|
| 18 |
+
|
| 19 |
+
role: Required[Literal["user", "assistant"]]
|
| 20 |
+
"""The role of the entity that is creating the message. Allowed values include:
|
| 21 |
+
|
| 22 |
+
- `user`: Indicates the message is sent by an actual user and should be used in
|
| 23 |
+
most cases to represent user-generated messages.
|
| 24 |
+
- `assistant`: Indicates the message is generated by the assistant. Use this
|
| 25 |
+
value to insert messages from the assistant into the conversation.
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
attachments: Optional[Iterable[Attachment]]
|
| 29 |
+
"""A list of files attached to the message, and the tools they should be added to."""
|
| 30 |
+
|
| 31 |
+
metadata: Optional[Metadata]
|
| 32 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 33 |
+
|
| 34 |
+
This can be useful for storing additional information about the object in a
|
| 35 |
+
structured format, and querying for objects via API or the dashboard.
|
| 36 |
+
|
| 37 |
+
Keys are strings with a maximum length of 64 characters. Values are strings with
|
| 38 |
+
a maximum length of 512 characters.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
class AttachmentToolFileSearch(TypedDict, total=False):
|
| 43 |
+
type: Required[Literal["file_search"]]
|
| 44 |
+
"""The type of tool being defined: `file_search`"""
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
AttachmentTool: TypeAlias = Union[CodeInterpreterToolParam, AttachmentToolFileSearch]
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
class Attachment(TypedDict, total=False):
|
| 51 |
+
file_id: str
|
| 52 |
+
"""The ID of the file to attach to the message."""
|
| 53 |
+
|
| 54 |
+
tools: Iterable[AttachmentTool]
|
| 55 |
+
"""The tools to add this file to."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/message_deleted.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["MessageDeleted"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class MessageDeleted(BaseModel):
|
| 11 |
+
id: str
|
| 12 |
+
|
| 13 |
+
deleted: bool
|
| 14 |
+
|
| 15 |
+
object: Literal["thread.message.deleted"]
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/message_delta_event.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
from .message_delta import MessageDelta
|
| 7 |
+
|
| 8 |
+
__all__ = ["MessageDeltaEvent"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class MessageDeltaEvent(BaseModel):
|
| 12 |
+
id: str
|
| 13 |
+
"""The identifier of the message, which can be referenced in API endpoints."""
|
| 14 |
+
|
| 15 |
+
delta: MessageDelta
|
| 16 |
+
"""The delta containing the fields that have changed on the Message."""
|
| 17 |
+
|
| 18 |
+
object: Literal["thread.message.delta"]
|
| 19 |
+
"""The object type, which is always `thread.message.delta`."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/message_list_params.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["MessageListParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class MessageListParams(TypedDict, total=False):
|
| 11 |
+
after: str
|
| 12 |
+
"""A cursor for use in pagination.
|
| 13 |
+
|
| 14 |
+
`after` is an object ID that defines your place in the list. For instance, if
|
| 15 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 16 |
+
subsequent call can include after=obj_foo in order to fetch the next page of the
|
| 17 |
+
list.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
before: str
|
| 21 |
+
"""A cursor for use in pagination.
|
| 22 |
+
|
| 23 |
+
`before` is an object ID that defines your place in the list. For instance, if
|
| 24 |
+
you make a list request and receive 100 objects, starting with obj_foo, your
|
| 25 |
+
subsequent call can include before=obj_foo in order to fetch the previous page
|
| 26 |
+
of the list.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
limit: int
|
| 30 |
+
"""A limit on the number of objects to be returned.
|
| 31 |
+
|
| 32 |
+
Limit can range between 1 and 100, and the default is 20.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
order: Literal["asc", "desc"]
|
| 36 |
+
"""Sort order by the `created_at` timestamp of the objects.
|
| 37 |
+
|
| 38 |
+
`asc` for ascending order and `desc` for descending order.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
run_id: str
|
| 42 |
+
"""Filter messages by the run ID that generated them."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/message_update_params.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Optional
|
| 6 |
+
from typing_extensions import Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from ...shared_params.metadata import Metadata
|
| 9 |
+
|
| 10 |
+
__all__ = ["MessageUpdateParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class MessageUpdateParams(TypedDict, total=False):
|
| 14 |
+
thread_id: Required[str]
|
| 15 |
+
|
| 16 |
+
metadata: Optional[Metadata]
|
| 17 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 18 |
+
|
| 19 |
+
This can be useful for storing additional information about the object in a
|
| 20 |
+
structured format, and querying for objects via API or the dashboard.
|
| 21 |
+
|
| 22 |
+
Keys are strings with a maximum length of 64 characters. Values are strings with
|
| 23 |
+
a maximum length of 512 characters.
|
| 24 |
+
"""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/refusal_content_block.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["RefusalContentBlock"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class RefusalContentBlock(BaseModel):
|
| 11 |
+
refusal: str
|
| 12 |
+
|
| 13 |
+
type: Literal["refusal"]
|
| 14 |
+
"""Always `refusal`."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/required_action_function_tool_call.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["RequiredActionFunctionToolCall", "Function"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class Function(BaseModel):
|
| 11 |
+
arguments: str
|
| 12 |
+
"""The arguments that the model expects you to pass to the function."""
|
| 13 |
+
|
| 14 |
+
name: str
|
| 15 |
+
"""The name of the function."""
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class RequiredActionFunctionToolCall(BaseModel):
|
| 19 |
+
id: str
|
| 20 |
+
"""The ID of the tool call.
|
| 21 |
+
|
| 22 |
+
This ID must be referenced when you submit the tool outputs in using the
|
| 23 |
+
[Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)
|
| 24 |
+
endpoint.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
function: Function
|
| 28 |
+
"""The function definition."""
|
| 29 |
+
|
| 30 |
+
type: Literal["function"]
|
| 31 |
+
"""The type of tool call the output is required for.
|
| 32 |
+
|
| 33 |
+
For now, this is always `function`.
|
| 34 |
+
"""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/run.py
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from typing import List, Optional
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ...._models import BaseModel
|
| 7 |
+
from .run_status import RunStatus
|
| 8 |
+
from ..assistant_tool import AssistantTool
|
| 9 |
+
from ...shared.metadata import Metadata
|
| 10 |
+
from ..assistant_tool_choice_option import AssistantToolChoiceOption
|
| 11 |
+
from ..assistant_response_format_option import AssistantResponseFormatOption
|
| 12 |
+
from .required_action_function_tool_call import RequiredActionFunctionToolCall
|
| 13 |
+
|
| 14 |
+
__all__ = [
|
| 15 |
+
"Run",
|
| 16 |
+
"IncompleteDetails",
|
| 17 |
+
"LastError",
|
| 18 |
+
"RequiredAction",
|
| 19 |
+
"RequiredActionSubmitToolOutputs",
|
| 20 |
+
"TruncationStrategy",
|
| 21 |
+
"Usage",
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class IncompleteDetails(BaseModel):
|
| 26 |
+
reason: Optional[Literal["max_completion_tokens", "max_prompt_tokens"]] = None
|
| 27 |
+
"""The reason why the run is incomplete.
|
| 28 |
+
|
| 29 |
+
This will point to which specific token limit was reached over the course of the
|
| 30 |
+
run.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
class LastError(BaseModel):
|
| 35 |
+
code: Literal["server_error", "rate_limit_exceeded", "invalid_prompt"]
|
| 36 |
+
"""One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`."""
|
| 37 |
+
|
| 38 |
+
message: str
|
| 39 |
+
"""A human-readable description of the error."""
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
class RequiredActionSubmitToolOutputs(BaseModel):
|
| 43 |
+
tool_calls: List[RequiredActionFunctionToolCall]
|
| 44 |
+
"""A list of the relevant tool calls."""
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
class RequiredAction(BaseModel):
|
| 48 |
+
submit_tool_outputs: RequiredActionSubmitToolOutputs
|
| 49 |
+
"""Details on the tool outputs needed for this run to continue."""
|
| 50 |
+
|
| 51 |
+
type: Literal["submit_tool_outputs"]
|
| 52 |
+
"""For now, this is always `submit_tool_outputs`."""
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
class TruncationStrategy(BaseModel):
|
| 56 |
+
type: Literal["auto", "last_messages"]
|
| 57 |
+
"""The truncation strategy to use for the thread.
|
| 58 |
+
|
| 59 |
+
The default is `auto`. If set to `last_messages`, the thread will be truncated
|
| 60 |
+
to the n most recent messages in the thread. When set to `auto`, messages in the
|
| 61 |
+
middle of the thread will be dropped to fit the context length of the model,
|
| 62 |
+
`max_prompt_tokens`.
|
| 63 |
+
"""
|
| 64 |
+
|
| 65 |
+
last_messages: Optional[int] = None
|
| 66 |
+
"""
|
| 67 |
+
The number of most recent messages from the thread when constructing the context
|
| 68 |
+
for the run.
|
| 69 |
+
"""
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
class Usage(BaseModel):
|
| 73 |
+
completion_tokens: int
|
| 74 |
+
"""Number of completion tokens used over the course of the run."""
|
| 75 |
+
|
| 76 |
+
prompt_tokens: int
|
| 77 |
+
"""Number of prompt tokens used over the course of the run."""
|
| 78 |
+
|
| 79 |
+
total_tokens: int
|
| 80 |
+
"""Total number of tokens used (prompt + completion)."""
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
class Run(BaseModel):
|
| 84 |
+
id: str
|
| 85 |
+
"""The identifier, which can be referenced in API endpoints."""
|
| 86 |
+
|
| 87 |
+
assistant_id: str
|
| 88 |
+
"""
|
| 89 |
+
The ID of the
|
| 90 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) used for
|
| 91 |
+
execution of this run.
|
| 92 |
+
"""
|
| 93 |
+
|
| 94 |
+
cancelled_at: Optional[int] = None
|
| 95 |
+
"""The Unix timestamp (in seconds) for when the run was cancelled."""
|
| 96 |
+
|
| 97 |
+
completed_at: Optional[int] = None
|
| 98 |
+
"""The Unix timestamp (in seconds) for when the run was completed."""
|
| 99 |
+
|
| 100 |
+
created_at: int
|
| 101 |
+
"""The Unix timestamp (in seconds) for when the run was created."""
|
| 102 |
+
|
| 103 |
+
expires_at: Optional[int] = None
|
| 104 |
+
"""The Unix timestamp (in seconds) for when the run will expire."""
|
| 105 |
+
|
| 106 |
+
failed_at: Optional[int] = None
|
| 107 |
+
"""The Unix timestamp (in seconds) for when the run failed."""
|
| 108 |
+
|
| 109 |
+
incomplete_details: Optional[IncompleteDetails] = None
|
| 110 |
+
"""Details on why the run is incomplete.
|
| 111 |
+
|
| 112 |
+
Will be `null` if the run is not incomplete.
|
| 113 |
+
"""
|
| 114 |
+
|
| 115 |
+
instructions: str
|
| 116 |
+
"""
|
| 117 |
+
The instructions that the
|
| 118 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) used for
|
| 119 |
+
this run.
|
| 120 |
+
"""
|
| 121 |
+
|
| 122 |
+
last_error: Optional[LastError] = None
|
| 123 |
+
"""The last error associated with this run. Will be `null` if there are no errors."""
|
| 124 |
+
|
| 125 |
+
max_completion_tokens: Optional[int] = None
|
| 126 |
+
"""
|
| 127 |
+
The maximum number of completion tokens specified to have been used over the
|
| 128 |
+
course of the run.
|
| 129 |
+
"""
|
| 130 |
+
|
| 131 |
+
max_prompt_tokens: Optional[int] = None
|
| 132 |
+
"""
|
| 133 |
+
The maximum number of prompt tokens specified to have been used over the course
|
| 134 |
+
of the run.
|
| 135 |
+
"""
|
| 136 |
+
|
| 137 |
+
metadata: Optional[Metadata] = None
|
| 138 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 139 |
+
|
| 140 |
+
This can be useful for storing additional information about the object in a
|
| 141 |
+
structured format, and querying for objects via API or the dashboard.
|
| 142 |
+
|
| 143 |
+
Keys are strings with a maximum length of 64 characters. Values are strings with
|
| 144 |
+
a maximum length of 512 characters.
|
| 145 |
+
"""
|
| 146 |
+
|
| 147 |
+
model: str
|
| 148 |
+
"""
|
| 149 |
+
The model that the
|
| 150 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) used for
|
| 151 |
+
this run.
|
| 152 |
+
"""
|
| 153 |
+
|
| 154 |
+
object: Literal["thread.run"]
|
| 155 |
+
"""The object type, which is always `thread.run`."""
|
| 156 |
+
|
| 157 |
+
parallel_tool_calls: bool
|
| 158 |
+
"""
|
| 159 |
+
Whether to enable
|
| 160 |
+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
| 161 |
+
during tool use.
|
| 162 |
+
"""
|
| 163 |
+
|
| 164 |
+
required_action: Optional[RequiredAction] = None
|
| 165 |
+
"""Details on the action required to continue the run.
|
| 166 |
+
|
| 167 |
+
Will be `null` if no action is required.
|
| 168 |
+
"""
|
| 169 |
+
|
| 170 |
+
response_format: Optional[AssistantResponseFormatOption] = None
|
| 171 |
+
"""Specifies the format that the model must output.
|
| 172 |
+
|
| 173 |
+
Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
| 174 |
+
[GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
| 175 |
+
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
| 176 |
+
|
| 177 |
+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
| 178 |
+
Outputs which ensures the model will match your supplied JSON schema. Learn more
|
| 179 |
+
in the
|
| 180 |
+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
| 181 |
+
|
| 182 |
+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
| 183 |
+
message the model generates is valid JSON.
|
| 184 |
+
|
| 185 |
+
**Important:** when using JSON mode, you **must** also instruct the model to
|
| 186 |
+
produce JSON yourself via a system or user message. Without this, the model may
|
| 187 |
+
generate an unending stream of whitespace until the generation reaches the token
|
| 188 |
+
limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
| 189 |
+
the message content may be partially cut off if `finish_reason="length"`, which
|
| 190 |
+
indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
| 191 |
+
max context length.
|
| 192 |
+
"""
|
| 193 |
+
|
| 194 |
+
started_at: Optional[int] = None
|
| 195 |
+
"""The Unix timestamp (in seconds) for when the run was started."""
|
| 196 |
+
|
| 197 |
+
status: RunStatus
|
| 198 |
+
"""
|
| 199 |
+
The status of the run, which can be either `queued`, `in_progress`,
|
| 200 |
+
`requires_action`, `cancelling`, `cancelled`, `failed`, `completed`,
|
| 201 |
+
`incomplete`, or `expired`.
|
| 202 |
+
"""
|
| 203 |
+
|
| 204 |
+
thread_id: str
|
| 205 |
+
"""
|
| 206 |
+
The ID of the [thread](https://platform.openai.com/docs/api-reference/threads)
|
| 207 |
+
that was executed on as a part of this run.
|
| 208 |
+
"""
|
| 209 |
+
|
| 210 |
+
tool_choice: Optional[AssistantToolChoiceOption] = None
|
| 211 |
+
"""
|
| 212 |
+
Controls which (if any) tool is called by the model. `none` means the model will
|
| 213 |
+
not call any tools and instead generates a message. `auto` is the default value
|
| 214 |
+
and means the model can pick between generating a message or calling one or more
|
| 215 |
+
tools. `required` means the model must call one or more tools before responding
|
| 216 |
+
to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
| 217 |
+
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
| 218 |
+
call that tool.
|
| 219 |
+
"""
|
| 220 |
+
|
| 221 |
+
tools: List[AssistantTool]
|
| 222 |
+
"""
|
| 223 |
+
The list of tools that the
|
| 224 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) used for
|
| 225 |
+
this run.
|
| 226 |
+
"""
|
| 227 |
+
|
| 228 |
+
truncation_strategy: Optional[TruncationStrategy] = None
|
| 229 |
+
"""Controls for how a thread will be truncated prior to the run.
|
| 230 |
+
|
| 231 |
+
Use this to control the intial context window of the run.
|
| 232 |
+
"""
|
| 233 |
+
|
| 234 |
+
usage: Optional[Usage] = None
|
| 235 |
+
"""Usage statistics related to the run.
|
| 236 |
+
|
| 237 |
+
This value will be `null` if the run is not in a terminal state (i.e.
|
| 238 |
+
`in_progress`, `queued`, etc.).
|
| 239 |
+
"""
|
| 240 |
+
|
| 241 |
+
temperature: Optional[float] = None
|
| 242 |
+
"""The sampling temperature used for this run. If not set, defaults to 1."""
|
| 243 |
+
|
| 244 |
+
top_p: Optional[float] = None
|
| 245 |
+
"""The nucleus sampling value used for this run. If not set, defaults to 1."""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/run_create_params.py
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import List, Union, Iterable, Optional
|
| 6 |
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
| 7 |
+
|
| 8 |
+
from ...chat_model import ChatModel
|
| 9 |
+
from ..assistant_tool_param import AssistantToolParam
|
| 10 |
+
from .runs.run_step_include import RunStepInclude
|
| 11 |
+
from ...shared_params.metadata import Metadata
|
| 12 |
+
from .message_content_part_param import MessageContentPartParam
|
| 13 |
+
from ..code_interpreter_tool_param import CodeInterpreterToolParam
|
| 14 |
+
from ..assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
|
| 15 |
+
from ..assistant_response_format_option_param import AssistantResponseFormatOptionParam
|
| 16 |
+
|
| 17 |
+
__all__ = [
|
| 18 |
+
"RunCreateParamsBase",
|
| 19 |
+
"AdditionalMessage",
|
| 20 |
+
"AdditionalMessageAttachment",
|
| 21 |
+
"AdditionalMessageAttachmentTool",
|
| 22 |
+
"AdditionalMessageAttachmentToolFileSearch",
|
| 23 |
+
"TruncationStrategy",
|
| 24 |
+
"RunCreateParamsNonStreaming",
|
| 25 |
+
"RunCreateParamsStreaming",
|
| 26 |
+
]
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
class RunCreateParamsBase(TypedDict, total=False):
|
| 30 |
+
assistant_id: Required[str]
|
| 31 |
+
"""
|
| 32 |
+
The ID of the
|
| 33 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
|
| 34 |
+
execute this run.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
include: List[RunStepInclude]
|
| 38 |
+
"""A list of additional fields to include in the response.
|
| 39 |
+
|
| 40 |
+
Currently the only supported value is
|
| 41 |
+
`step_details.tool_calls[*].file_search.results[*].content` to fetch the file
|
| 42 |
+
search result content.
|
| 43 |
+
|
| 44 |
+
See the
|
| 45 |
+
[file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
| 46 |
+
for more information.
|
| 47 |
+
"""
|
| 48 |
+
|
| 49 |
+
additional_instructions: Optional[str]
|
| 50 |
+
"""Appends additional instructions at the end of the instructions for the run.
|
| 51 |
+
|
| 52 |
+
This is useful for modifying the behavior on a per-run basis without overriding
|
| 53 |
+
other instructions.
|
| 54 |
+
"""
|
| 55 |
+
|
| 56 |
+
additional_messages: Optional[Iterable[AdditionalMessage]]
|
| 57 |
+
"""Adds additional messages to the thread before creating the run."""
|
| 58 |
+
|
| 59 |
+
instructions: Optional[str]
|
| 60 |
+
"""
|
| 61 |
+
Overrides the
|
| 62 |
+
[instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
|
| 63 |
+
of the assistant. This is useful for modifying the behavior on a per-run basis.
|
| 64 |
+
"""
|
| 65 |
+
|
| 66 |
+
max_completion_tokens: Optional[int]
|
| 67 |
+
"""
|
| 68 |
+
The maximum number of completion tokens that may be used over the course of the
|
| 69 |
+
run. The run will make a best effort to use only the number of completion tokens
|
| 70 |
+
specified, across multiple turns of the run. If the run exceeds the number of
|
| 71 |
+
completion tokens specified, the run will end with status `incomplete`. See
|
| 72 |
+
`incomplete_details` for more info.
|
| 73 |
+
"""
|
| 74 |
+
|
| 75 |
+
max_prompt_tokens: Optional[int]
|
| 76 |
+
"""The maximum number of prompt tokens that may be used over the course of the run.
|
| 77 |
+
|
| 78 |
+
The run will make a best effort to use only the number of prompt tokens
|
| 79 |
+
specified, across multiple turns of the run. If the run exceeds the number of
|
| 80 |
+
prompt tokens specified, the run will end with status `incomplete`. See
|
| 81 |
+
`incomplete_details` for more info.
|
| 82 |
+
"""
|
| 83 |
+
|
| 84 |
+
metadata: Optional[Metadata]
|
| 85 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 86 |
+
|
| 87 |
+
This can be useful for storing additional information about the object in a
|
| 88 |
+
structured format, and querying for objects via API or the dashboard.
|
| 89 |
+
|
| 90 |
+
Keys are strings with a maximum length of 64 characters. Values are strings with
|
| 91 |
+
a maximum length of 512 characters.
|
| 92 |
+
"""
|
| 93 |
+
|
| 94 |
+
model: Union[str, ChatModel, None]
|
| 95 |
+
"""
|
| 96 |
+
The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
|
| 97 |
+
be used to execute this run. If a value is provided here, it will override the
|
| 98 |
+
model associated with the assistant. If not, the model associated with the
|
| 99 |
+
assistant will be used.
|
| 100 |
+
"""
|
| 101 |
+
|
| 102 |
+
parallel_tool_calls: bool
|
| 103 |
+
"""
|
| 104 |
+
Whether to enable
|
| 105 |
+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
| 106 |
+
during tool use.
|
| 107 |
+
"""
|
| 108 |
+
|
| 109 |
+
response_format: Optional[AssistantResponseFormatOptionParam]
|
| 110 |
+
"""Specifies the format that the model must output.
|
| 111 |
+
|
| 112 |
+
Compatible with [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
| 113 |
+
[GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
| 114 |
+
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
| 115 |
+
|
| 116 |
+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
| 117 |
+
Outputs which ensures the model will match your supplied JSON schema. Learn more
|
| 118 |
+
in the
|
| 119 |
+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
| 120 |
+
|
| 121 |
+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
|
| 122 |
+
message the model generates is valid JSON.
|
| 123 |
+
|
| 124 |
+
**Important:** when using JSON mode, you **must** also instruct the model to
|
| 125 |
+
produce JSON yourself via a system or user message. Without this, the model may
|
| 126 |
+
generate an unending stream of whitespace until the generation reaches the token
|
| 127 |
+
limit, resulting in a long-running and seemingly "stuck" request. Also note that
|
| 128 |
+
the message content may be partially cut off if `finish_reason="length"`, which
|
| 129 |
+
indicates the generation exceeded `max_tokens` or the conversation exceeded the
|
| 130 |
+
max context length.
|
| 131 |
+
"""
|
| 132 |
+
|
| 133 |
+
temperature: Optional[float]
|
| 134 |
+
"""What sampling temperature to use, between 0 and 2.
|
| 135 |
+
|
| 136 |
+
Higher values like 0.8 will make the output more random, while lower values like
|
| 137 |
+
0.2 will make it more focused and deterministic.
|
| 138 |
+
"""
|
| 139 |
+
|
| 140 |
+
tool_choice: Optional[AssistantToolChoiceOptionParam]
|
| 141 |
+
"""
|
| 142 |
+
Controls which (if any) tool is called by the model. `none` means the model will
|
| 143 |
+
not call any tools and instead generates a message. `auto` is the default value
|
| 144 |
+
and means the model can pick between generating a message or calling one or more
|
| 145 |
+
tools. `required` means the model must call one or more tools before responding
|
| 146 |
+
to the user. Specifying a particular tool like `{"type": "file_search"}` or
|
| 147 |
+
`{"type": "function", "function": {"name": "my_function"}}` forces the model to
|
| 148 |
+
call that tool.
|
| 149 |
+
"""
|
| 150 |
+
|
| 151 |
+
tools: Optional[Iterable[AssistantToolParam]]
|
| 152 |
+
"""Override the tools the assistant can use for this run.
|
| 153 |
+
|
| 154 |
+
This is useful for modifying the behavior on a per-run basis.
|
| 155 |
+
"""
|
| 156 |
+
|
| 157 |
+
top_p: Optional[float]
|
| 158 |
+
"""
|
| 159 |
+
An alternative to sampling with temperature, called nucleus sampling, where the
|
| 160 |
+
model considers the results of the tokens with top_p probability mass. So 0.1
|
| 161 |
+
means only the tokens comprising the top 10% probability mass are considered.
|
| 162 |
+
|
| 163 |
+
We generally recommend altering this or temperature but not both.
|
| 164 |
+
"""
|
| 165 |
+
|
| 166 |
+
truncation_strategy: Optional[TruncationStrategy]
|
| 167 |
+
"""Controls for how a thread will be truncated prior to the run.
|
| 168 |
+
|
| 169 |
+
Use this to control the intial context window of the run.
|
| 170 |
+
"""
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
class AdditionalMessageAttachmentToolFileSearch(TypedDict, total=False):
|
| 174 |
+
type: Required[Literal["file_search"]]
|
| 175 |
+
"""The type of tool being defined: `file_search`"""
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
AdditionalMessageAttachmentTool: TypeAlias = Union[CodeInterpreterToolParam, AdditionalMessageAttachmentToolFileSearch]
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
class AdditionalMessageAttachment(TypedDict, total=False):
|
| 182 |
+
file_id: str
|
| 183 |
+
"""The ID of the file to attach to the message."""
|
| 184 |
+
|
| 185 |
+
tools: Iterable[AdditionalMessageAttachmentTool]
|
| 186 |
+
"""The tools to add this file to."""
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
class AdditionalMessage(TypedDict, total=False):
|
| 190 |
+
content: Required[Union[str, Iterable[MessageContentPartParam]]]
|
| 191 |
+
"""The text contents of the message."""
|
| 192 |
+
|
| 193 |
+
role: Required[Literal["user", "assistant"]]
|
| 194 |
+
"""The role of the entity that is creating the message. Allowed values include:
|
| 195 |
+
|
| 196 |
+
- `user`: Indicates the message is sent by an actual user and should be used in
|
| 197 |
+
most cases to represent user-generated messages.
|
| 198 |
+
- `assistant`: Indicates the message is generated by the assistant. Use this
|
| 199 |
+
value to insert messages from the assistant into the conversation.
|
| 200 |
+
"""
|
| 201 |
+
|
| 202 |
+
attachments: Optional[Iterable[AdditionalMessageAttachment]]
|
| 203 |
+
"""A list of files attached to the message, and the tools they should be added to."""
|
| 204 |
+
|
| 205 |
+
metadata: Optional[Metadata]
|
| 206 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 207 |
+
|
| 208 |
+
This can be useful for storing additional information about the object in a
|
| 209 |
+
structured format, and querying for objects via API or the dashboard.
|
| 210 |
+
|
| 211 |
+
Keys are strings with a maximum length of 64 characters. Values are strings with
|
| 212 |
+
a maximum length of 512 characters.
|
| 213 |
+
"""
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
class TruncationStrategy(TypedDict, total=False):
|
| 217 |
+
type: Required[Literal["auto", "last_messages"]]
|
| 218 |
+
"""The truncation strategy to use for the thread.
|
| 219 |
+
|
| 220 |
+
The default is `auto`. If set to `last_messages`, the thread will be truncated
|
| 221 |
+
to the n most recent messages in the thread. When set to `auto`, messages in the
|
| 222 |
+
middle of the thread will be dropped to fit the context length of the model,
|
| 223 |
+
`max_prompt_tokens`.
|
| 224 |
+
"""
|
| 225 |
+
|
| 226 |
+
last_messages: Optional[int]
|
| 227 |
+
"""
|
| 228 |
+
The number of most recent messages from the thread when constructing the context
|
| 229 |
+
for the run.
|
| 230 |
+
"""
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
class RunCreateParamsNonStreaming(RunCreateParamsBase, total=False):
|
| 234 |
+
stream: Optional[Literal[False]]
|
| 235 |
+
"""
|
| 236 |
+
If `true`, returns a stream of events that happen during the Run as server-sent
|
| 237 |
+
events, terminating when the Run enters a terminal state with a `data: [DONE]`
|
| 238 |
+
message.
|
| 239 |
+
"""
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
class RunCreateParamsStreaming(RunCreateParamsBase):
|
| 243 |
+
stream: Required[Literal[True]]
|
| 244 |
+
"""
|
| 245 |
+
If `true`, returns a stream of events that happen during the Run as server-sent
|
| 246 |
+
events, terminating when the Run enters a terminal state with a `data: [DONE]`
|
| 247 |
+
message.
|
| 248 |
+
"""
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
RunCreateParams = Union[RunCreateParamsNonStreaming, RunCreateParamsStreaming]
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/run_list_params.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["RunListParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class RunListParams(TypedDict, total=False):
|
| 11 |
+
after: str
|
| 12 |
+
"""A cursor for use in pagination.
|
| 13 |
+
|
| 14 |
+
`after` is an object ID that defines your place in the list. For instance, if
|
| 15 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 16 |
+
subsequent call can include after=obj_foo in order to fetch the next page of the
|
| 17 |
+
list.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
before: str
|
| 21 |
+
"""A cursor for use in pagination.
|
| 22 |
+
|
| 23 |
+
`before` is an object ID that defines your place in the list. For instance, if
|
| 24 |
+
you make a list request and receive 100 objects, starting with obj_foo, your
|
| 25 |
+
subsequent call can include before=obj_foo in order to fetch the previous page
|
| 26 |
+
of the list.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
limit: int
|
| 30 |
+
"""A limit on the number of objects to be returned.
|
| 31 |
+
|
| 32 |
+
Limit can range between 1 and 100, and the default is 20.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
order: Literal["asc", "desc"]
|
| 36 |
+
"""Sort order by the `created_at` timestamp of the objects.
|
| 37 |
+
|
| 38 |
+
`asc` for ascending order and `desc` for descending order.
|
| 39 |
+
"""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/run_update_params.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Optional
|
| 6 |
+
from typing_extensions import Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from ...shared_params.metadata import Metadata
|
| 9 |
+
|
| 10 |
+
__all__ = ["RunUpdateParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class RunUpdateParams(TypedDict, total=False):
|
| 14 |
+
thread_id: Required[str]
|
| 15 |
+
|
| 16 |
+
metadata: Optional[Metadata]
|
| 17 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 18 |
+
|
| 19 |
+
This can be useful for storing additional information about the object in a
|
| 20 |
+
structured format, and querying for objects via API or the dashboard.
|
| 21 |
+
|
| 22 |
+
Keys are strings with a maximum length of 64 characters. Values are strings with
|
| 23 |
+
a maximum length of 512 characters.
|
| 24 |
+
"""
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from .run_step import RunStep as RunStep
|
| 6 |
+
from .tool_call import ToolCall as ToolCall
|
| 7 |
+
from .run_step_delta import RunStepDelta as RunStepDelta
|
| 8 |
+
from .tool_call_delta import ToolCallDelta as ToolCallDelta
|
| 9 |
+
from .run_step_include import RunStepInclude as RunStepInclude
|
| 10 |
+
from .step_list_params import StepListParams as StepListParams
|
| 11 |
+
from .function_tool_call import FunctionToolCall as FunctionToolCall
|
| 12 |
+
from .run_step_delta_event import RunStepDeltaEvent as RunStepDeltaEvent
|
| 13 |
+
from .step_retrieve_params import StepRetrieveParams as StepRetrieveParams
|
| 14 |
+
from .code_interpreter_logs import CodeInterpreterLogs as CodeInterpreterLogs
|
| 15 |
+
from .file_search_tool_call import FileSearchToolCall as FileSearchToolCall
|
| 16 |
+
from .tool_call_delta_object import ToolCallDeltaObject as ToolCallDeltaObject
|
| 17 |
+
from .tool_calls_step_details import ToolCallsStepDetails as ToolCallsStepDetails
|
| 18 |
+
from .function_tool_call_delta import FunctionToolCallDelta as FunctionToolCallDelta
|
| 19 |
+
from .code_interpreter_tool_call import CodeInterpreterToolCall as CodeInterpreterToolCall
|
| 20 |
+
from .file_search_tool_call_delta import FileSearchToolCallDelta as FileSearchToolCallDelta
|
| 21 |
+
from .run_step_delta_message_delta import RunStepDeltaMessageDelta as RunStepDeltaMessageDelta
|
| 22 |
+
from .code_interpreter_output_image import CodeInterpreterOutputImage as CodeInterpreterOutputImage
|
| 23 |
+
from .message_creation_step_details import MessageCreationStepDetails as MessageCreationStepDetails
|
| 24 |
+
from .code_interpreter_tool_call_delta import CodeInterpreterToolCallDelta as CodeInterpreterToolCallDelta
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (1.87 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_logs.cpython-311.pyc
ADDED
|
Binary file (840 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_output_image.cpython-311.pyc
ADDED
|
Binary file (1.15 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/code_interpreter_tool_call_delta.cpython-311.pyc
ADDED
|
Binary file (1.88 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/file_search_tool_call.cpython-311.pyc
ADDED
|
Binary file (2.43 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/file_search_tool_call_delta.cpython-311.pyc
ADDED
|
Binary file (901 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/function_tool_call.cpython-311.pyc
ADDED
|
Binary file (1.16 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/function_tool_call_delta.cpython-311.pyc
ADDED
|
Binary file (1.34 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/message_creation_step_details.cpython-311.pyc
ADDED
|
Binary file (1.01 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step.cpython-311.pyc
ADDED
|
Binary file (2.96 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_delta.cpython-311.pyc
ADDED
|
Binary file (1.22 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_delta_event.cpython-311.pyc
ADDED
|
Binary file (855 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_delta_message_delta.cpython-311.pyc
ADDED
|
Binary file (1.14 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/run_step_include.cpython-311.pyc
ADDED
|
Binary file (475 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/step_list_params.cpython-311.pyc
ADDED
|
Binary file (1.1 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/step_retrieve_params.cpython-311.pyc
ADDED
|
Binary file (936 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/tool_call.cpython-311.pyc
ADDED
|
Binary file (881 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/openai/types/beta/threads/runs/__pycache__/tool_call_delta.cpython-311.pyc
ADDED
|
Binary file (928 Bytes). View file
|
|
|