You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
600 B
19 lines
600 B
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"
|
|
)
|