Skip to content

Commit

Permalink
Fix(agents-api): Remove duplicate fields in autogen
Browse files Browse the repository at this point in the history
  • Loading branch information
HamadaSalhab committed Oct 1, 2024
1 parent c1828e6 commit a6f7e6a
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions agents-api/agents_api/autogen/Tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,11 @@ class CreateToolRequest(BaseModel):
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDef | None = None
function: FunctionDef | None = None
"""
The function to call
"""
integration: IntegrationDef | None = None
system: SystemDef | None = None
integration: IntegrationDef | None = None
system: SystemDef | None = None


class FunctionCallOption(BaseModel):
Expand All @@ -75,7 +72,6 @@ class FunctionDef(BaseModel):
DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons.
"""
description: str | None = None
description: str | None = None
"""
Description of the function
"""
Expand Down Expand Up @@ -225,52 +221,6 @@ class SystemDef(BaseModel):
"""


class SystemDefUpdate(BaseModel):
"""
System definition
"""

model_config = ConfigDict(
populate_by_name=True,
)
call: str | None = None
"""
The name of the system call
"""
description: str | None = None
"""
Optional description of the system call
"""
arguments: dict[str, Any] | None = None
"""
The arguments to pre-apply to the system call
"""
integration: IntegrationDefUpdate | None = None
system: SystemDefUpdate | None = None


class SystemDef(BaseModel):
"""
System definition
"""

model_config = ConfigDict(
populate_by_name=True,
)
call: str
"""
The name of the system call
"""
description: str | None = None
"""
Optional description of the system call
"""
arguments: dict[str, Any] | None = None
"""
The arguments to pre-apply to the system call
"""


class SystemDefUpdate(BaseModel):
"""
System definition
Expand Down Expand Up @@ -306,14 +256,11 @@ class Tool(BaseModel):
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDef | None = None
function: FunctionDef | None = None
"""
The function to call
"""
integration: IntegrationDef | None = None
system: SystemDef | None = None
integration: IntegrationDef | None = None
system: SystemDef | None = None
created_at: Annotated[AwareDatetime, Field(json_schema_extra={"readOnly": True})]
"""
When this resource was created as UTC date-time
Expand Down Expand Up @@ -353,14 +300,11 @@ class UpdateToolRequest(BaseModel):
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDef | None = None
function: FunctionDef | None = None
"""
The function to call
"""
integration: IntegrationDef | None = None
system: SystemDef | None = None
integration: IntegrationDef | None = None
system: SystemDef | None = None


class ChosenFunctionCall(ChosenToolCall):
Expand Down

0 comments on commit a6f7e6a

Please sign in to comment.