Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ac8bf11

Browse files
authoredJun 5, 2025··
fix: tool parameter mapping for responses (#704)
1 parent 5999b9f commit ac8bf11

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
 

‎lib/openai/resources/chat/completions.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ 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-
144143
tool
145144
else
146145
tool

‎lib/openai/resources/responses.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ def create(params)
117117
name = func[:name] ||= params.name.split("::").last
118118
tool_models.store(name, params)
119119
func.update(parameters: params.to_json_schema)
120+
tool
120121
else
122+
tool
121123
end
122124
end
123125
tools.replace(mapped)

0 commit comments

Comments
 (0)
Please sign in to comment.