|
25 | 25 | Column("description", Text, nullable=True), |
26 | 26 | Column("provider_id", ForeignKey("providers.id", ondelete="CASCADE"), nullable=False), |
27 | 27 | Column("metadata", JSON, nullable=False), |
| 28 | + Column("input_content_types", JSON, nullable=True), |
| 29 | + Column("output_content_types", JSON, nullable=True), |
28 | 30 | ) |
29 | 31 |
|
30 | 32 | agent_requests_table = Table( |
@@ -55,6 +57,8 @@ async def bulk_create(self, agents: list[Agent]) -> None: |
55 | 57 | "description": agent.description, |
56 | 58 | "provider_id": agent.metadata.provider_id, |
57 | 59 | "metadata": agent.metadata.model_dump(mode="json"), |
| 60 | + "input_content_types": agent.input_content_types, |
| 61 | + "output_content_types": agent.output_content_types, |
58 | 62 | } |
59 | 63 | for agent in agents |
60 | 64 | ] |
@@ -84,6 +88,8 @@ def _to_agent(self, row: Row) -> Agent: |
84 | 88 | "name": row.name, |
85 | 89 | "description": row.description, |
86 | 90 | "metadata": row.metadata, |
| 91 | + "input_content_types": row.input_content_types or ["*/*"], |
| 92 | + "output_content_types": row.output_content_types or ["*/*"], |
87 | 93 | } |
88 | 94 | ) |
89 | 95 |
|
|
0 commit comments