Skip to content

Commit

Permalink
fix(openai): consume title from jsonschema as function name (#4897)
Browse files Browse the repository at this point in the history
  • Loading branch information
dqbd authored Mar 27, 2024
1 parent b00e51a commit 9305887
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/langchain-openai/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ export class ChatOpenAI<
functionName = schema.name;
} else {
openAIFunctionDefinition = {
name: functionName,
name: schema.title ?? functionName,
description: schema.description ?? "",
parameters: schema,
};
Expand Down

0 comments on commit 9305887

Please sign in to comment.