fix: fix issue with linking tools and adding new tools (#1988)

Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
This commit is contained in:
Sarah Wooders
2024-11-06 14:06:10 -08:00
committed by GitHub
parent 30c102cfd6
commit 640d4c0a22
8 changed files with 35 additions and 27 deletions

View File

@@ -68,7 +68,7 @@ class ToolCreate(LettaBase):
tags: List[str] = Field([], description="Metadata tags.")
module: Optional[str] = Field(None, description="The source code of the function.")
source_code: str = Field(..., description="The source code of the function.")
source_type: str = Field(..., description="The source type of the function.")
source_type: str = Field("python", description="The source type of the function.")
json_schema: Optional[Dict] = Field(
None, description="The JSON schema of the function (auto-generated from source_code if not provided)"
)
@@ -216,3 +216,7 @@ class ToolUpdate(LettaBase):
json_schema: Optional[Dict] = Field(
None, description="The JSON schema of the function (auto-generated from source_code if not provided)"
)
class Config:
extra = "ignore" # Allows extra fields without validation errors
# TODO: Remove this, and clean usage of ToolUpdate everywhere else