Helicone Community Page

C
K
m
H
E
Members
Armin
A
Armin
Offline, last seen last month
Joined September 9, 2024
The below connection doesn't work altough everything is setup correctly.

I even have to add the "apiKey" in the root of the config object, cause otherwise I get an error from openAI that the apiKey is undefined.

This also isn't mentioned in the Helicone Azure Doc

Any ideas?


import OpenAI from "openai"

const openai = new OpenAI({
baseURL: "https://oai.helicone.ai/openai/deployments/[DeploymentName]",
defaultHeaders: {
"Helicone-Auth": Bearer ${process.env.HELICONE_API_KEY},
"Helicone-OpenAI-API-Base": "https://chatarmin-ai.openai.azure.com",
"api-key": process.env.AZURE_API_KEY,
"Helicone-Cache-Enabled": "true",
},
apiKey: process.env.AZURE_API_KEY,
defaultQuery: { "api-version": "2024-05-13" },
})
5 comments
R
C