mirror of
https://github.com/langchain-ai/langgraphjs.git
synced 2026-07-21 16:45:24 -04:00
chore: update oss API spec to match python (#1726)
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph-api": patch
|
||||
---
|
||||
|
||||
Update API spec to match python api
|
||||
@@ -68,7 +68,13 @@ api.post(
|
||||
total = item.total;
|
||||
}
|
||||
}
|
||||
c.res.headers.set("X-Pagination-Total", total.toString());
|
||||
const nextOffset = (payload.offset ?? 0) + total;
|
||||
if (total === payload.limit) {
|
||||
c.res.headers.set("X-Pagination-Next", nextOffset.toString());
|
||||
c.res.headers.set("X-Pagination-Total", (nextOffset + 1).toString());
|
||||
} else {
|
||||
c.res.headers.set("X-Pagination-Total", nextOffset.toString());
|
||||
}
|
||||
return jsonExtra(c, result);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -367,7 +367,7 @@ export class FileSystemAssistants implements AssistantsRepo {
|
||||
graph_id: options.graph_id,
|
||||
metadata: mutable.metadata ?? ({} as Metadata),
|
||||
name: options.name || options.graph_id,
|
||||
description: options.description,
|
||||
description: options.description ?? null,
|
||||
};
|
||||
|
||||
STORE.assistant_versions.push({
|
||||
@@ -379,7 +379,7 @@ export class FileSystemAssistants implements AssistantsRepo {
|
||||
metadata: mutable.metadata ?? ({} as Metadata),
|
||||
created_at: now,
|
||||
name: options.name || options.graph_id,
|
||||
description: options.description,
|
||||
description: options.description ?? null,
|
||||
});
|
||||
|
||||
return STORE.assistants[assistant_id];
|
||||
|
||||
@@ -82,8 +82,8 @@ export interface RunnableConfig {
|
||||
}
|
||||
|
||||
export interface Assistant {
|
||||
name: string | undefined;
|
||||
description: string | undefined;
|
||||
name: string;
|
||||
description: string | null;
|
||||
assistant_id: string;
|
||||
graph_id: string;
|
||||
created_at: Date;
|
||||
@@ -102,8 +102,8 @@ export interface AssistantVersion {
|
||||
context: unknown;
|
||||
metadata: Metadata;
|
||||
created_at: Date;
|
||||
name: string | undefined;
|
||||
description: string | undefined;
|
||||
name: string;
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
export interface RunKwargs {
|
||||
|
||||
Reference in New Issue
Block a user