Skip to content

Custom objects result in large input schema blocks #544

Open
@strawgate

Description

@strawgate

The refs structure of common json schema means the $defs of input objects get defined once per tool .

Perhaps referenced object schemas could be provided separately from the input schema or extracted out? into a common reference?

class KnowledgeBaseUpdateProto(ExportableModel):
    """Model for requesting an update to a Knowledge Base"""

    name: str = kb_name_field
    description: str = kb_description_field

async def update_by_backend_id(self, backend_id: str, knowledge_base_update: KnowledgeBaseUpdateProto) -> None:
    ...
- knowledge_base_update_by_backend_id: Update the metadata of an existing knowledge base by its backend ID.
    Input Schema:
		{
      "type": "object",
      "properties": {
        "backend_id": {
          "title": "Backend Id",
          "type": "string"
        },
        "knowledge_base_update": {
          "$ref": "#/$defs/KnowledgeBaseUpdateProto"
        }
      },
      "$defs": {
        "KnowledgeBaseUpdateProto": {
          "description": "Model for requesting an update to a Knowledge Base",
          "properties": {
            "name": {
              "description": "The name of the knowledge base, used for identification and retrieval.",
              "title": "Name",
              "type": "string"
            },
            "description": {
              "description": "A brief description of the knowledge base, providing context and purpose.",
              "title": "Description",
              "type": "string"
            }
          },
          "required": [
            "name",
            "description"
          ],
          "title": "KnowledgeBaseUpdateProto",
          "type": "object"
        }
      },
      "required": [
        "backend_id",
        "knowledge_base_update"
      ],
      "title": "update_by_backend_idArguments"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions