Skip to content

Commit

Permalink
feat(openapi): Update spec to include role=function + render_templates (
Browse files Browse the repository at this point in the history
#276)

* feat(openapi): Update spec to include role=function + render_templates

Signed-off-by: Diwank Singh Tomer <[email protected]>

* fix(agents-api): Fix for dependabot security alert; bump fastapi

Signed-off-by: Diwank Singh Tomer <[email protected]>

* fix(sdks/python): Fix for pytype error

Signed-off-by: Diwank Singh Tomer <[email protected]>

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr authored Apr 18, 2024
1 parent 5a38ea5 commit 65093fd
Show file tree
Hide file tree
Showing 20 changed files with 1,689 additions and 761 deletions.
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

0 comments on commit 65093fd

Please sign in to comment.