Helicone Community Page

Updated 3 months ago

Responses not logging in helicone

Hi, Our organisation ReallyBrief want to integrate helicone to our Nextjs application. On adding the code, requests are not getting reflected in dashboard. Can you please help debug this
k
C
6 comments
Plain Text
import OpenAI from 'openai';

const openai = new OpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  baseURL: 'https://oai.hconeai.com/v1',
  defaultHeaders: {
    'Helicone-Auth': `Bearer ${process.env.HELICONE_KEY}`,
  },
});
this is a function in nextjs pages/api/ai.js
Hi , your setup looks correct. Would you first be able to try generating a new helicone api key and trying that key? If the key is invalid, or potentially not being found in environment variables, we will not log the request/response but will still proxy.
i can try generating a now key now. i can add the key hardcoded for testing.
it works locally right?
Add a reply
Sign up and join the conversation on Discord