Skip to content

Commit

Permalink
updated shard.lock and added tool_call_id
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis committed Nov 28, 2023
1 parent a4ba2fb commit ae7ba19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ shards:

openai:
git: https://github.com/spider-gazelle/crystal-openai.git
version: 0.9.1+git.commit.9ba725a12c2b029ae53109249c810d62291a729e
version: 0.9.1+git.commit.4f3127df2154434e02ed355d2fc321da5e1df10a

openapi-generator:
git: https://github.com/place-labs/openapi-generator.git
Expand Down
2 changes: 1 addition & 1 deletion src/placeos-rest-api/controllers/chat_gpt/chat_manager.cr
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ module PlaceOS::Api
msg.lchop("OpenAI called unknown function: name: '")[...-2]
end
end || "unknown_function"
request.messages << OpenAI::ChatMessage.new(:tool, result.to_pretty_json, func_name)
request.messages << OpenAI::ChatMessage.new(:tool, result.to_pretty_json, func_name, tool_call_id: tool_calls.first?.try &.id)
next
end

Expand Down

0 comments on commit ae7ba19

Please sign in to comment.