Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Helicone with Azure doesn't work #2582

Open
adaryabegi opened this issue Sep 9, 2024 · 0 comments
Open

[Bug]: Helicone with Azure doesn't work #2582

adaryabegi opened this issue Sep 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@adaryabegi
Copy link

What happened?

I want to use Azure as my OpenAi Provider.

I have created a deployment on Azure and received my credentials.

Upon following the Doc here to connect to Helicone with Azure (NodeJs) -> It just doesn't work.

  1. First of all, when I have my config just like in the Doc (without the apiKey property in the root). Like so:
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",
  },
  defaultQuery: { "api-version": "2024-05-13" },
})

This throws me an Error: "The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' })."

  1. So when adding the apiKey the error doesn't appear, but when I now try to do an embedding like so:
await openai.embeddings.create({
      input: [text],
      model: "text-embedding-3-small",
    })

I just get a 404 Error, saying "Resource not found".

So basically the Azure Doc of Helicone has to be outdated.

I am using "openai": "^4.58.1"

Relevant log output

No response

Twitter / LinkedIn details

No response

@adaryabegi adaryabegi added the bug Something isn't working label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant