Skip to content

Commit 5999b9f

Browse files
authored
fix: tool parameter mapping for chat completions (#156)
1 parent 105cf47 commit 5999b9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/openai/resources/chat/completions.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def create(params)
140140
name = func[:name] ||= params.name.split("::").last
141141
tool_models.store(name, params)
142142
func.update(parameters: params.to_json_schema)
143+
144+
tool
143145
else
146+
tool
144147
end
145148
end
146149
tools.replace(mapped)

0 commit comments

Comments
 (0)