Helicone Community Page

Updated last year

Get Azure Open Ai Api

export const getAzureOpenAIApi = () => {
const openai = new OpenAI({
apiKey: "API_KEY",
baseURL: https://oai.hconeai.com/openai/deployments/{DEPLOYMENT}/chat/completions?api-version=2023-08-01-preview,
defaultHeaders: {
"Helicone-Auth": Bearer KEY,
"Helicone-OpenAI-API-Base": "https://{myazure}.openai.azure.com",
"Helicone-OpenAI-Cache": "true",
"api-key": "api_key",
},
defaultQuery: { "api-version": "2023-05-15" },
});
J
I
31 comments
Would you mind sending over a quick screenshot of the request page of the model that is coming back? >Like this
Attachment
Screenshot_2023-11-19_at_12.12.25_AM.png
interesting and the cost is showing 0 in that view too? What are the prompt and completion tokens?
Yep, the prompt and completion tokens are positive numbers. In the dashboard view the costs are fine though
The total costs as well as hourly costs
I opened the console, I can see an error
but this is showing 0?
Attachment
Screenshot_2023-11-19_at_12.14.48_AM.png
oh would you mind sharing?
....interesting πŸ€”
Honestly the cache is more important. Do you have any idea why it's not working?
nope - this should work. Let me just verify it is working on our end
When I used just OpenAI it worked perfect. Since I swtched to Azure, it doesnt'
I think our cache might be down right now πŸ€”
looking into this right now
thanks for bringing to our attention
Not sure for how long though, cause mine isn't working for like more than two weeks I think
but sure. I am here if you have any questions
Should be fixed now! Would you mind giving it another go?
None of them is fixed :/
Still don't have cache in place, neither the seeing costs
Hi @Itay Elgazar are you using this package?

https://www.npmjs.com/package/@azure/openai
Nope, I am using just "OpenAI" (I think it's based on your docs)
maybe I am wrong tho
It looks like you are using some OpenAI package
Hi @Itay Elgazar I think I got to the bottom of this.

Are you by chance using cache with streaming?
I am using the OpenAI package, not azure, but with azure credentials
No, I am not :/
Add a reply
Sign up and join the conversation on Discord