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(openapi): Update spec to include role=function + render_templates #276

Merged
merged 3 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 11 additions & 2 deletions agents-api/agents_api/autogen/openapi_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2024-04-11T06:53:51+00:00
# timestamp: 2024-04-18T12:56:54+00:00

from __future__ import annotations

Expand Down Expand Up @@ -34,7 +34,7 @@ class User(BaseModel):
"""
metadata: Dict[str, Any] | None = None
"""
Optional metadata
(Optional) metadata
"""


Expand Down Expand Up @@ -120,6 +120,10 @@ class Session(BaseModel):
"""
Optional metadata
"""
render_templates: bool | None = False
"""
Render system and assistant message content as jinja templates
"""


class CreateSessionRequest(BaseModel):
Expand All @@ -143,6 +147,10 @@ class CreateSessionRequest(BaseModel):
"""
Optional metadata
"""
render_templates: bool | None = False
"""
Render system and assistant message content as jinja templates
"""


class UpdateSessionRequest(BaseModel):
Expand Down Expand Up @@ -220,6 +228,7 @@ class Role(str, Enum):
assistant = "assistant"
system = "system"
function_call = "function_call"
function = "function"


class ChatMLMessage(BaseModel):
Expand Down
378 changes: 290 additions & 88 deletions agents-api/poetry.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion agents-api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ packages = [{include = "agents_api"}]

[tool.poetry.dependencies]
python = ">=3.10,<3.13"
fastapi = "^0.103.1"
fastapi = "^0.109.1"
pycozo = {extras = ["embedded"], version = "^0.7.6"}
uvicorn = "^0.23.2"
fire = "^0.5.0"
Expand All @@ -22,6 +22,10 @@ sentry-sdk = {extras = ["fastapi"], version = "^1.38.0"}
ward = "^0.68.0b0"
temporalio = "^1.4.0"
pydantic = "^2.5.3"
arrow = "^1.3.0"
jinja2 = "^3.1.3"
jinja2schema = "^0.1.4"
jsonschema = "^4.21.1"


[tool.poetry.group.dev.dependencies]
Expand Down
Loading
Loading