types: relax type for tools (#550)

This commit is contained in:
Parth Sareen
2025-08-05 15:59:56 -07:00
committed by GitHub
parent dad9e1ca3a
commit 34e98bd237
3 changed files with 10 additions and 8 deletions

View File

@@ -79,7 +79,7 @@ class SubscriptableBaseModel(BaseModel):
if key in self.model_fields_set:
return True
if value := self.model_fields.get(key):
if value := self.__class__.model_fields.get(key):
return value.default is not None
return False
@@ -313,7 +313,7 @@ class Message(SubscriptableBaseModel):
class Tool(SubscriptableBaseModel):
type: Optional[Literal['function']] = 'function'
type: Optional[str] = 'function'
class Function(SubscriptableBaseModel):
name: Optional[str] = None