Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add basic support for integration tools to ToolStep #519

Merged
merged 7 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions agents-api/agents_api/autogen/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
from pydantic import AwareDatetime, BaseModel, ConfigDict, Field, RootModel


class JinjaTemplate(RootModel[str]):
model_config = ConfigDict(
populate_by_name=True,
)
root: str
"""
A valid jinja template.
"""


class Limit(RootModel[int]):
model_config = ConfigDict(
populate_by_name=True,
Expand Down
50 changes: 50 additions & 0 deletions agents-api/agents_api/autogen/Sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ class CreateSessionRequest(BaseModel):
"""
Action to start on context window overflow
"""
forward_tool_results: Literal["auto"] | StrictBool = "auto"
"""
Whether to forward the tool results to the model when available.
"true" => always forward
"false" => never forward
"auto" => forward if applicable

If a tool call is made, the tool's output will be sent back to the model as the model's input.
If a tool call is not made, the model's output will be returned as is.
"""
metadata: dict[str, Any] | None = None


Expand Down Expand Up @@ -70,6 +80,16 @@ class PatchSessionRequest(BaseModel):
"""
Action to start on context window overflow
"""
forward_tool_results: Literal["auto"] | StrictBool = "auto"
"""
Whether to forward the tool results to the model when available.
"true" => always forward
"false" => never forward
"auto" => forward if applicable

If a tool call is made, the tool's output will be sent back to the model as the model's input.
If a tool call is not made, the model's output will be returned as is.
"""
metadata: dict[str, Any] | None = None


Expand Down Expand Up @@ -97,6 +117,16 @@ class Session(BaseModel):
"""
Action to start on context window overflow
"""
forward_tool_results: Literal["auto"] | StrictBool = "auto"
"""
Whether to forward the tool results to the model when available.
"true" => always forward
"false" => never forward
"auto" => forward if applicable

If a tool call is made, the tool's output will be sent back to the model as the model's input.
If a tool call is not made, the model's output will be returned as is.
"""
id: Annotated[UUID, Field(json_schema_extra={"readOnly": True})]
metadata: dict[str, Any] | None = None
created_at: Annotated[AwareDatetime, Field(json_schema_extra={"readOnly": True})]
Expand Down Expand Up @@ -160,6 +190,16 @@ class UpdateSessionRequest(BaseModel):
"""
Action to start on context window overflow
"""
forward_tool_results: Literal["auto"] | StrictBool = "auto"
"""
Whether to forward the tool results to the model when available.
"true" => always forward
"false" => never forward
"auto" => forward if applicable

If a tool call is made, the tool's output will be sent back to the model as the model's input.
If a tool call is not made, the model's output will be returned as is.
"""
metadata: dict[str, Any] | None = None


Expand Down Expand Up @@ -194,6 +234,16 @@ class CreateOrUpdateSessionRequest(CreateSessionRequest):
"""
Action to start on context window overflow
"""
forward_tool_results: Literal["auto"] | StrictBool = "auto"
"""
Whether to forward the tool results to the model when available.
"true" => always forward
"false" => never forward
"auto" => forward if applicable

If a tool call is made, the tool's output will be sent back to the model as the model's input.
If a tool call is not made, the model's output will be returned as is.
"""
metadata: dict[str, Any] | None = None


Expand Down
Loading
Loading