diff --git a/libs/sdk-js/src/index.ts b/libs/sdk-js/src/index.ts index 0626144cd..71253b679 100644 --- a/libs/sdk-js/src/index.ts +++ b/libs/sdk-js/src/index.ts @@ -1,6 +1,7 @@ export { Client } from "./client.js"; export type { + AssistantBase, Assistant, AssistantVersion, AssistantGraph, diff --git a/libs/sdk-js/src/schema.ts b/libs/sdk-js/src/schema.ts index 84596c82c..b75d63d02 100644 --- a/libs/sdk-js/src/schema.ts +++ b/libs/sdk-js/src/schema.ts @@ -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 { diff --git a/libs/sdk-py/langgraph_sdk/client.py b/libs/sdk-py/langgraph_sdk/client.py index 2fcecd825..59d37c23e 100644 --- a/libs/sdk-py/langgraph_sdk/client.py +++ b/libs/sdk-py/langgraph_sdk/client.py @@ -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: diff --git a/libs/sdk-py/langgraph_sdk/schema.py b/libs/sdk-py/langgraph_sdk/schema.py index ab5ad65f5..f6b8bb164 100644 --- a/libs/sdk-py/langgraph_sdk/schema.py +++ b/libs/sdk-py/langgraph_sdk/schema.py @@ -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):