We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d634ac8 commit 09099f1Copy full SHA for 09099f1
1 file changed
verifiers/clients/openai_chat_completions_client.py
@@ -205,14 +205,22 @@ def from_chat_message(message: Message) -> OpenAIChatMessage:
205
return [from_chat_message(message) for message in messages], {}
206
207
async def to_native_tool(self, tool: Tool) -> OpenAITool:
208
- return OpenAITool(
209
- type="function",
210
- function=FunctionDefinition(
+ if tool.strict is None:
+ function = FunctionDefinition(
+ name=tool.name,
211
+ description=tool.description,
212
+ parameters=tool.parameters,
213
+ )
214
+ else:
215
216
name=tool.name,
217
description=tool.description,
218
parameters=tool.parameters,
219
strict=tool.strict,
- ),
220
221
+ return OpenAITool(
222
+ type="function",
223
+ function=function,
224
)
225
226
@handle_openai_overlong_prompt
0 commit comments