-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from datastax/run-step-retrieval-details
Retrieval Details
- Loading branch information
Showing
9 changed files
with
446 additions
and
1,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from typing import Optional, Annotated, List | ||
|
||
from pydantic import Field | ||
from pydantic import Field, StrictStr | ||
|
||
from impl.model.assistant_object_tools_inner import AssistantObjectToolsInner | ||
from openapi_server.models.assistant_object import AssistantObject as AssistantObjectGenerated | ||
|
||
|
||
class AssistantObject(AssistantObjectGenerated): | ||
tools: Annotated[List[AssistantObjectToolsInner], Field(max_length=20)] = Field(description="The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.") | ||
file_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from typing import Optional, Annotated, List | ||
|
||
from pydantic import Field | ||
from pydantic import Field, StrictStr | ||
|
||
from impl.model.assistant_object_tools_inner import AssistantObjectToolsInner | ||
from openapi_server.models.create_assistant_request import CreateAssistantRequest as CreateAssistantRequestGenerated | ||
|
||
|
||
class CreateAssistantRequest(CreateAssistantRequestGenerated): | ||
tools: Optional[Annotated[List[AssistantObjectToolsInner], Field(max_length=128)]] = Field(default=None, description="assistant_tools_param_description") | ||
tools: Optional[Annotated[List[AssistantObjectToolsInner], Field(max_length=128)]] = Field(default=None, description="assistant_tools_param_description") | ||
file_ids: Optional[Annotated[List[StrictStr], Field(max_length=1000)]] = Field(default=None, description="assistant_file_param_description") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
try: | ||
from typing import Self | ||
except ImportError: | ||
from typing_extensions import Self | ||
from typing import List, Dict | ||
|
||
|
||
from pydantic import Field | ||
|
||
from impl.model.message_stream_response_object import MessageStreamResponseObject | ||
from openapi_server.models.list_messages_stream_response import ListMessagesStreamResponse as ListMessagesStreamResponseGenerated | ||
|
||
|
||
class ListMessagesStreamResponse(ListMessagesStreamResponseGenerated): | ||
data: List[MessageStreamResponseObject] = Field(description="The streamed chunks of messages, each representing a part of a message or a full message.") | ||
|
||
@classmethod | ||
def from_dict(cls, obj: Dict) -> Self: | ||
"""Create an instance of ListMessagesStreamResponse from a dict""" | ||
if obj is None: | ||
return None | ||
|
||
if not isinstance(obj, dict): | ||
return cls.model_validate(obj) | ||
|
||
_obj = cls.model_validate({ | ||
"object": obj.get("object"), | ||
"data": [MessageStreamResponseObject.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None, | ||
"first_id": obj.get("first_id"), | ||
"last_id": obj.get("last_id") | ||
}) | ||
return _obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from typing import List | ||
from typing import List, Annotated | ||
|
||
from pydantic import Field | ||
from pydantic import Field, StrictStr | ||
|
||
from openapi_server.models.message_content_text_object import MessageContentTextObject | ||
from openapi_server.models.message_object import MessageObject as MessageObjectGenerated | ||
|
||
class MessageObject(MessageObjectGenerated): | ||
content: List[MessageContentTextObject] | ||
file_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="A list of [file](/docs/api-reference/files) IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Annotated, List | ||
|
||
from pydantic import StrictStr, Field | ||
|
||
from openapi_server.models.message_stream_response_object import MessageStreamResponseObject as MessageStreamResponseObjectGenerated | ||
|
||
|
||
class MessageStreamResponseObject(MessageStreamResponseObjectGenerated): | ||
file_ids: Annotated[List[StrictStr], Field(max_length=1000)] = Field(description="A list of [file](/docs/api-reference/files) IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message.") |
Oops, something went wrong.