Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Jun 19, 2024
1 parent c92fac4 commit 1f1b33f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion backend/app/api/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ class AssistantPayload(BaseModel):
public: bool = Field(default=False, description="Whether the assistant is public.")


class AssistantPatch(BaseModel):
"""Payload for creating an assistant."""

name: str | None = Field(None, description="The name of the assistant.")
config: dict | None = Field(None, description="The assistant config.")
public: bool | None = Field(None, description="Whether the assistant is public.")


AssistantID = Annotated[str, Path(description="The ID of the assistant.")]


Expand Down Expand Up @@ -67,7 +75,7 @@ async def create_assistant(
async def patch_assistant(
user: AuthedUser,
aid: AssistantID,
payload: AssistantPayload,
payload: AssistantPatch,
) -> Assistant:
"""Create or update an assistant."""
if payload.config and not payload.config.get("configurable", {}).get("type"):
Expand Down

0 comments on commit 1f1b33f

Please sign in to comment.