Swarms / swarms /tools /cohere_func_call_schema.py
harshalmore31's picture
Synced repo using 'sync_with_huggingface' Github Action
d8d14f1 verified
raw
history blame contribute delete
600 Bytes
from pydantic import BaseModel, Field
from typing import Dict
class ParameterDefinition(BaseModel):
description: str = Field(
..., title="Description of the parameter"
)
type: str = Field(..., title="Type of the parameter")
required: bool = Field(..., title="Is the parameter required?")
class CohereFuncSchema(BaseModel):
name: str = Field(..., title="Name of the tool")
description: str = Field(..., title="Description of the tool")
parameter_definitions: Dict[str, ParameterDefinition] = Field(
..., title="Parameter definitions for the tool"
)