I am having a hard time trying to get Helicone to work with the Azure OpenAI service....
I have tried a few variations and can't seem to get things working. I also don't see anything in the instructions about how to specify a deployment name (I have a deployment for GPT-3.5 and GPT-4) so not sure if that is causing the problem?
Here is my code snippet:
import { Configuration, OpenAIApi } from "openai";
const configuration = new Configuration({
apiKey: process.env.AZURE_API_KEY,
basePath: "https://oai.hconeai.com/v1",
baseOptions: {
headers: {
"Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`,
"Helicone-OpenAI-Api-Base": `https://XXXX.openai.azure.com`,
}
}
});
const openai = new OpenAIApi(configuration);
In the Helicone Dashboard, I am seeing the request being logged as a 404 and saying "Resource not found" do you have anyway to see if the request contains the API key correctly, or understand what is causing it?
I know it is deployed and available, because the following code snippet is when I use the OpenAI Azure NodeJS library directly, which works fine:
import { Configuration, OpenAIApi } from "azure-openai";
const openai = new OpenAIApi(
new Configuration({
apiKey: process.env.AZURE_API_KEY,
azure: {
apiKey: process.env.AZURE_API_KEY,
endpoint: process.env.AZURE_URL,
deploymentName: 'XXXXXXX',
}
}),
);