Mark all schemas as optional in js and py sdk typings

This commit is contained in:
Nuno Campos
2024-08-01 09:43:46 -07:00
parent e4905f438a
commit 15ded2c17b
2 changed files with 21 additions and 8 deletions
+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):