Skip to content

Commit

Permalink
Fix typing for OpenAI tools
Browse files Browse the repository at this point in the history
  • Loading branch information
jpwilliams committed Nov 25, 2024
1 parent f05ba5e commit f28a1ea
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/adapters/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ export const requestParser: AgenticModel.RequestParser<OpenAi.AiModel> = (
if (tools?.length) {
request.tools = tools.map((t) => {
return {
name: t.name,
description: t.description,
parameters: zodToJsonSchema(t.parameters),
strict: true,
type: "function",
function: {
name: t.name,
description: t.description,
parameters: zodToJsonSchema(t.parameters),
strict: true,
},
};
});
}
Expand Down

0 comments on commit f28a1ea

Please sign in to comment.