Merge pull request #1188 from langchain-ai/nc/1aug/update-sdks

Nc/1aug/update sdks
This commit is contained in:
Nuno Campos
2024-08-01 09:54:47 -07:00
committed by GitHub
4 changed files with 32 additions and 13 deletions
+2
View File
@@ -1,4 +1,5 @@
/docs
## GENERATED create-entrypoints.js
/client.cjs
/client.js
/client.d.ts
@@ -7,3 +8,4 @@
/index.js
/index.d.ts
/index.d.cts
## END GENERATED create-entrypoints.js
+9 -5
View File
@@ -97,11 +97,15 @@ const updateConfig = () => {
const endMarker = "## END GENERATED create-entrypoints.js";
const startIdx = lines.findIndex((line) => line.includes(startMarker));
const endIdx = lines.findIndex((line) => line.includes(endMarker));
const newLines = [
...lines.slice(0, startIdx + 1),
...filenames.map((fname) => `/${fname}`),
...lines.slice(endIdx),
];
const newLines = lines.slice(0, startIdx + 1);
if (startIdx === -1) {
newLines.push(startMarker);
}
newLines.push(...filenames.map((fname) => `/${fname}`));
if (endIdx === -1) {
newLines.push(endMarker);
}
newLines.push(...lines.slice(endIdx));
fs.writeFileSync("./.gitignore", newLines.join("\n"));
};
+12 -4
View File
@@ -39,14 +39,22 @@ export interface GraphSchema {
graph_id: string;
/**
* The schema for the graph state
* The schema for the graph state.
* Missing if unable to generate JSON schema from graph.
*/
state_schema: JSONSchema7;
input_schema?: JSONSchema7;
/**
* The schema for the graph config
* The schema for the graph state.
* Missing if unable to generate JSON schema from graph.
*/
config_schema: JSONSchema7;
state_schema?: JSONSchema7;
/**
* The schema for the graph config.
* Missing if unable to generate JSON schema from graph.
*/
config_schema?: JSONSchema7;
}
export type Metadata = Optional<Record<string, unknown>>;
+9 -4
View File
@@ -42,10 +42,15 @@ class GraphSchema(TypedDict):
graph_id: str
"""The ID of the graph."""
state_schema: dict
"""The schema for the graph state."""
config_schema: dict
"""The schema for the graph config."""
input_schema: Optional[dict]
"""The schema for the graph state.
Missing if unable to generate JSON schema from graph."""
state_schema: Optional[dict]
"""The schema for the graph state.
Missing if unable to generate JSON schema from graph."""
config_schema: Optional[dict]
"""The schema for the graph config.
Missing if unable to generate JSON schema from graph."""
class Assistant(TypedDict):