feat: update assistant version class (#3702)

This commit is contained in:
Nuno Campos
2025-03-06 10:21:51 -08:00
committed by GitHub
4 changed files with 10 additions and 7 deletions
+1
View File
@@ -1,6 +1,7 @@
export { Client } from "./client.js";
export type {
AssistantBase,
Assistant,
AssistantVersion,
AssistantGraph,
+3 -3
View File
@@ -110,6 +110,9 @@ export interface AssistantBase {
/** The version of the assistant. */
version: number;
/** The name of the assistant */
name: string;
}
export interface AssistantVersion extends AssistantBase {}
@@ -117,9 +120,6 @@ export interface AssistantVersion extends AssistantBase {}
export interface Assistant extends AssistantBase {
/** The last time the assistant was updated. */
updated_at: string;
/** The name of the assistant */
name: string;
}
export interface AssistantGraph {
+4 -2
View File
@@ -388,7 +388,9 @@ class AssistantsClient:
'created_at': '2024-06-25T17:10:33.109781+00:00',
'updated_at': '2024-06-25T17:10:33.109781+00:00',
'config': {},
'metadata': {'created_by': 'system'}
'metadata': {'created_by': 'system'},
'version': 1,
'name': 'my_assistant'
}
""" # noqa: E501
@@ -742,7 +744,7 @@ class AssistantsClient:
offset: The number of versions to skip.
Returns:
list[Assistant]: A list of assistants.
list[AssistantVersion]: A list of assistant versions.
Example Usage:
+2 -2
View File
@@ -169,6 +169,8 @@ class AssistantBase(TypedDict):
"""The assistant metadata."""
version: int
"""The version of the assistant"""
name: str
"""The name of the assistant"""
class AssistantVersion(AssistantBase):
@@ -182,8 +184,6 @@ class Assistant(AssistantBase):
updated_at: datetime
"""The last time the assistant was updated."""
name: str
"""The name of the assistant"""
class Interrupt(TypedDict, total=False):