feat(api): add int xray parameter support

This commit is contained in:
Tat Dat Duong
2024-09-30 00:18:07 +02:00
parent 748c92e59c
commit 10b6227304
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -221,11 +221,12 @@ export class AssistantsClient extends BaseClient {
/**
* Get the JSON representation of the graph assigned to a runnable
* @param assistantId The ID of the assistant.
* @param options.xray Whether to include subgraphs in the serialized graph representation.
* @returns Serialized graph
*/
async getGraph(
assistantId: string,
options?: { xray?: boolean },
options?: { xray?: boolean | number },
): Promise<AssistantGraph> {
return this.fetch<AssistantGraph>(`/assistants/${assistantId}/graph`, {
params: { xray: options?.xray },
+2 -2
View File
@@ -305,7 +305,7 @@ class AssistantsClient:
return await self.http.get(f"/assistants/{assistant_id}")
async def get_graph(
self, assistant_id: str, *, xray: bool = False
self, assistant_id: str, *, xray: Union[int, bool] = False
) -> dict[str, list[dict[str, Any]]]:
"""Get the graph of an assistant by ID.
@@ -2074,7 +2074,7 @@ class SyncAssistantsClient:
return self.http.get(f"/assistants/{assistant_id}")
def get_graph(
self, assistant_id: str, *, xray: bool = False
self, assistant_id: str, *, xray: Union[int, bool] = False
) -> dict[str, list[dict[str, Any]]]:
"""Get the graph of an assistant by ID.