Add output_schema to LibraryAgent

This commit is contained in:
Krzysztof Czerwinski
2025-05-31 13:42:07 +02:00
parent c6941e7f6e
commit eec0d276d5
3 changed files with 5 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ class LibraryAgent(pydantic.BaseModel):
# Made input_schema and output_schema match GraphMeta's type
input_schema: dict[str, Any] # Should be BlockIOObjectSubSchema in frontend
output_schema: dict[str, Any]
# Indicates whether there's a new output (based on recent runs)
new_output: bool
@@ -106,6 +107,7 @@ class LibraryAgent(pydantic.BaseModel):
name=graph.name,
description=graph.description,
input_schema=graph.input_schema,
output_schema=graph.output_schema,
new_output=new_output,
can_access_graph=can_access_graph,
is_latest_version=is_latest_version,

View File

@@ -43,6 +43,7 @@ async def test_get_library_agents_success(mocker: pytest_mock.MockFixture):
creator_name="Test Creator",
creator_image_url="",
input_schema={"type": "object", "properties": {}},
output_schema={"type": "object", "properties": {}},
status=library_model.LibraryAgentStatus.COMPLETED,
new_output=False,
can_access_graph=True,
@@ -59,6 +60,7 @@ async def test_get_library_agents_success(mocker: pytest_mock.MockFixture):
creator_name="Test Creator",
creator_image_url="",
input_schema={"type": "object", "properties": {}},
output_schema={"type": "object", "properties": {}},
status=library_model.LibraryAgentStatus.COMPLETED,
new_output=False,
can_access_graph=False,

View File

@@ -469,6 +469,7 @@ export type LibraryAgent = {
name: string;
description: string;
input_schema: BlockIOObjectSubSchema;
output_schema: BlockIOObjectSubSchema;
new_output: boolean;
can_access_graph: boolean;
is_latest_version: boolean;