Skip to content

Commit

Permalink
fix: Set empty string as a default value for function description
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed Apr 16, 2024
1 parent 328e752 commit 9af99cf
Showing 1 changed file with 2 additions and 2 deletions.
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 9af99cf

Please sign in to comment.