Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nodejs/langchain/quickstart-before/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function getClient(): Promise<Client> {
azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY,
azureOpenAIApiInstanceName: process.env.AZURE_OPENAI_ENDPOINT.replace('https://', '').replace('.openai.azure.com/', '').replace('.openai.azure.com', ''),
azureOpenAIApiDeploymentName: process.env.AZURE_OPENAI_DEPLOYMENT,
azureOpenAIApiVersion: process.env.AZURE_OPENAI_API_VERSION || '2024-12-01-preview',
azureOpenAIApiVersion: process.env.AZURE_OPENAI_API_VERSION || '2025-03-01-preview',
});
} else if (process.env.OPENAI_API_KEY) {
model = new ChatOpenAI({ model: 'gpt-4o-mini' });
Expand Down
2 changes: 1 addition & 1 deletion nodejs/langchain/sample-agent/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
AZURE_OPENAI_API_KEY=
AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_DEPLOYMENT=
AZURE_OPENAI_API_VERSION=2024-12-01-preview
AZURE_OPENAI_API_VERSION=2025-03-01-preview

# Option 2: OpenAI (if Azure OpenAI not configured)
OPENAI_API_KEY=
Expand Down
2 changes: 1 addition & 1 deletion nodejs/langchain/sample-agent/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function createChatModel(): BaseChatModel {
azureOpenAIApiKey: process.env.AZURE_OPENAI_API_KEY,
azureOpenAIApiInstanceName: process.env.AZURE_OPENAI_ENDPOINT?.replace('https://', '').replace('.openai.azure.com/', '').replace('.openai.azure.com', ''),
azureOpenAIApiDeploymentName: process.env.AZURE_OPENAI_DEPLOYMENT,
azureOpenAIApiVersion: process.env.AZURE_OPENAI_API_VERSION || "2024-12-01-preview",
azureOpenAIApiVersion: process.env.AZURE_OPENAI_API_VERSION || "2025-03-01-preview",
Comment thread
gwharris7 marked this conversation as resolved.
temperature: 0,
});
}
Expand Down
2 changes: 1 addition & 1 deletion nodejs/openai/sample-agent/src/openai-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function configureOpenAIClient(): void {
const azureClient = new AzureOpenAI({
apiKey: process.env.AZURE_OPENAI_API_KEY,
endpoint: process.env.AZURE_OPENAI_ENDPOINT,
apiVersion: process.env.AZURE_OPENAI_API_VERSION || '2024-10-21',
apiVersion: process.env.AZURE_OPENAI_API_VERSION || '2025-03-01-preview',
deployment: process.env.AZURE_OPENAI_DEPLOYMENT,
});

Expand Down
Loading