Skip to content

Commit

Permalink
Agent creation fixes (#309)
Browse files Browse the repository at this point in the history
* fix: Convert preset to string

* fix: Fallback to an empty list if there are not instructions
  • Loading branch information
whiterabbit1983 authored May 2, 2024
1 parent daaf2ff commit cd6f540
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions agents-api/agents_api/models/agent/create_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def create_agent_query(
pd.DataFrame: A DataFrame containing the results of the query execution.
"""

preset = default_settings["preset"]
default_settings["preset"] = getattr(preset, "value", preset)

settings_cols, settings_vals = cozo_process_mutate_data(
{
**default_settings,
Expand Down
2 changes: 1 addition & 1 deletion agents-api/agents_api/routers/agents/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async def create_agent(
developer_id=x_developer_id,
name=request.name,
about=request.about,
instructions=request.instructions,
instructions=request.instructions or [],
model=request.model,
default_settings=(
request.default_settings or AgentDefaultSettings()
Expand Down

0 comments on commit cd6f540

Please sign in to comment.