Skip to content

Commit

Permalink
chore: update ua string
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Jan 17, 2025
1 parent ff0dc58 commit 0fe53d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libs/langchain-openai/src/azure/chat_models.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from "node:process";
import { type ClientOptions, AzureOpenAI as AzureOpenAIClient } from "openai";
import {
LangSmithParams,
Expand Down Expand Up @@ -504,9 +505,7 @@ export class AzureChatOpenAI extends ChatOpenAI {

params.defaultHeaders = {
...params.defaultHeaders,
"User-Agent": params.defaultHeaders?.["User-Agent"]
? `${params.defaultHeaders["User-Agent"]}: langchainjs-azure-openai-v2`
: `langchainjs-azure-openai-v2`,
"User-Agent": `langchainjs-azure-openai/2.0.0 (node.js/${process.version}; ${process.platform}; ${process.arch}) ${params.defaultHeaders?.["User-Agent"] || ""}`
};

this.client = new AzureOpenAIClient({
Expand Down

0 comments on commit 0fe53d4

Please sign in to comment.