Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Diwank Tomer <[email protected]>
  • Loading branch information
Diwank Tomer committed Jul 22, 2024
1 parent c3bc32c commit 059f94b
Show file tree
Hide file tree
Showing 45 changed files with 154 additions and 1,159 deletions.
2 changes: 1 addition & 1 deletion agents-api/agents_api/autogen/Entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Annotated, Literal
from uuid import UUID

from pydantic import AnyUrl, AwareDatetime, BaseModel, ConfigDict, Field
from pydantic import AnyUrl, AwareDatetime, BaseModel, ConfigDict, Field, RootModel

from .Tools import ChosenToolCall, Tool, ToolResponse

Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/autogen/Executions.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class Transition(BaseModel):
Field(json_schema_extra={"readOnly": True}),
]
execution_id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})]
outputs: Annotated[dict[str, Any], Field(json_schema_extra={"readOnly": True})]
output: Annotated[dict[str, Any], Field(json_schema_extra={"readOnly": True})]
current: Annotated[list, Field(json_schema_extra={"readOnly": True})]
next: Annotated[list | None, Field(json_schema_extra={"readOnly": True})]
id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})]
Expand Down
32 changes: 16 additions & 16 deletions agents-api/agents_api/autogen/Tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ class CreateToolRequest(BaseModel):
"""
Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)
"""
background: bool = False
name: Annotated[str, Field(pattern="^[^\\W0-9]\\w*$")]
"""
The tool should be run in the background (not supported at the moment)
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDef | None = None
integration: Any | None = None
Expand Down Expand Up @@ -72,10 +72,6 @@ class FunctionDef(BaseModel):
"""
DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons.
"""
parameters: dict[str, Any]
"""
The parameters the function accepts
"""
description: Annotated[
str | None,
Field(
Expand All @@ -86,6 +82,10 @@ class FunctionDef(BaseModel):
"""
Description of the function
"""
parameters: dict[str, Any]
"""
The parameters the function accepts
"""


class FunctionDefUpdate(BaseModel):
Expand All @@ -100,10 +100,6 @@ class FunctionDefUpdate(BaseModel):
"""
DO NOT USE: This will be overriden by the tool name. Here only for compatibility reasons.
"""
parameters: dict[str, Any] | None = None
"""
The parameters the function accepts
"""
description: Annotated[
str | None,
Field(
Expand All @@ -114,6 +110,10 @@ class FunctionDefUpdate(BaseModel):
"""
Description of the function
"""
parameters: dict[str, Any] | None = None
"""
The parameters the function accepts
"""


class PatchToolRequest(BaseModel):
Expand All @@ -128,9 +128,9 @@ class PatchToolRequest(BaseModel):
"""
Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)
"""
background: bool = False
name: Annotated[str | None, Field(None, pattern="^[^\\W0-9]\\w*$")]
"""
The tool should be run in the background (not supported at the moment)
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDefUpdate | None = None
integration: Any | None = None
Expand All @@ -146,9 +146,9 @@ class Tool(BaseModel):
"""
Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)
"""
background: bool = False
name: Annotated[str, Field(pattern="^[^\\W0-9]\\w*$")]
"""
The tool should be run in the background (not supported at the moment)
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDef | None = None
integration: Any | None = None
Expand Down Expand Up @@ -188,9 +188,9 @@ class UpdateToolRequest(BaseModel):
"""
Whether this tool is a `function`, `api_call`, `system` etc. (Only `function` tool supported right now)
"""
background: bool = False
name: Annotated[str, Field(pattern="^[^\\W0-9]\\w*$")]
"""
The tool should be run in the background (not supported at the moment)
Name of the tool (must be unique for this agent and a valid python identifier string )
"""
function: FunctionDef | None = None
integration: Any | None = None
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/usr/bin/env python3
# /usr/bin/env python3

MIGRATION_ID = "extended_tool_relations"
CREATED_AT = 1721576813.383905
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#/usr/bin/env python3
# /usr/bin/env python3

MIGRATION_ID = "task_tool_ref_by_name"
CREATED_AT = 1721609661.768934



# - add metadata
# - add inherit_tools bool
# - rename tools_available to tools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/usr/bin/env python3
# /usr/bin/env python3

MIGRATION_ID = "multi_agent_multi_user_session"
CREATED_AT = 1721609675.213755
Expand Down
20 changes: 10 additions & 10 deletions agents-api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 059f94b

Please sign in to comment.