Skip to content

Commit

Permalink
fix: Set empty string as a default value for function description (#195)
Browse files Browse the repository at this point in the history
* fix: Set empty string as a default value for function description

* fix: Fix session update query

---------

Co-authored-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
whiterabbit1983 and creatorrr authored Apr 17, 2024
1 parent e3f933a commit 365af15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions agents-api/agents_api/models/session/update_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ def update_session_query(
session_update_query = f"""
{{
input[{session_update_cols}] <- $session_update_vals
ids[session_id, developer_id] <- [[$session_id, $developer_id]]
?[{all_fields}, updated_at] :=
input[{session_update_cols}],
ids[session_id, developer_id],
*sessions{{
{rest_fields}, @ "NOW"
}},
Expand Down
4 changes: 2 additions & 2 deletions agents-api/agents_api/routers/agents/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ async def update_tool(
embeddings = await embed(
[
function_embed_instruction
+ request.function.description
+ (request.function.description or "")
+ "\nParameters: "
+ json.dumps(request.function.parameters.model_dump())
],
Expand Down Expand Up @@ -528,7 +528,7 @@ async def patch_tool(
embeddings = await embed(
[
function_embed_instruction
+ request.function.description
+ (request.function.description or "")
+ "\nParameters: "
+ json.dumps(request.function.parameters.model_dump())
],
Expand Down

0 comments on commit 365af15

Please sign in to comment.