⨯ ../../node_modules/fsevents/fsevents.node Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)
../../node_modules/@helicone/helicone/dist/async_logger/HeliconeAsyncLogger.js ../../node_modules/@helicone/helicone/dist/index.js
hprompt
in a nextjs app directory api routeimport { hprompt } from "@helicone/helicone"; const chatCompletion = await openai.chat.completions.create( { messages: [ { role: "user", // 2: Add hprompt to any string, and nest any variable in additional brackets `{}` content: hprompt`Write a story about ${{ character }}`, }, ], model: "gpt-3.5-turbo", }, { // 3. Add Prompt Id Header headers: { "Helicone-Prompt-Id": "prompt_story", }, } );
export const respondLink = async ( messages: ChatMessage[], username?: string, ) => { const { text } = await generateText({ model, headers: { "Helicone-Prompt-Id": "respond_link", "Helicone-User-Id": username, }, system: `Prompt here`, messages, }); return text; };
baseURL: "https://oai.hconeai.com/v1",
- I also tried returning the generate text func directlyconst linkPrompt = hprompt`prompt`; export const respondLink = async ( messages: ChatMessage[], username?: string, ) => { const { text } = await generateText({ model, headers: { "Helicone-Prompt-Id": "respond_link", "Helicone-User-Id": username, }, system: linkPrompt.toString(), messages, }); return text; };
const linkPrompt = hprompt`prompt ${{ hello: "world" }}`; export const respondLink = async ( messages: ChatMessage[], username?: string, ) => { const { text } = await generateText({ model, headers: { "Helicone-Prompt-Id": "respond_link", "Helicone-User-Id": username, }, system: linkPrompt, messages, }); return text; };
⨯ ../../node_modules/fsevents/fsevents.node Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file) Import trace for requested module: ../../node_modules/fsevents/fsevents.node ../../node_modules/fsevents/fsevents.js ../../node_modules/chokidar/lib/fsevents-handler.js ../../node_modules/chokidar/index.js ../../node_modules/nunjucks/src/node-loaders.js ../../node_modules/nunjucks/src/loaders.js ../../node_modules/nunjucks/index.js ../../node_modules/@traceloop/node-server-sdk/dist/index.mjs ../../node_modules/@helicone/helicone/dist/async_logger/HeliconeAsyncLogger.js ../../node_modules/@helicone/helicone/dist/index.js ./src/app/api/webhooks/twilio/_helpers/respond-link.ts ./src/app/api/webhooks/twilio/_helpers/response-delegator.ts ./src/app/api/webhooks/twilio/process-twilio-message.ts ./src/app/api/webhooks/twilio/development/route.ts ⨯ ../../node_modules/fsevents/fsevents.node Module parse failed: Unexpected character '�' (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders (Source code omitted for this binary file)
export const openai = createOpenAI({ apiKey: env.OPENAI_API_KEY, baseURL: "https://oai.hconeai.com/v1", headers: { "Helicone-Auth": `Bearer ${env.HELICONE_API_KEY}`, "Helicone-Property-Environment": process.env.NODE_ENV ?? "development", }, }); export const model = openai("gpt-4-vision-preview");
const openai = createOpenAI({ apiKey: "sk-", baseURL: "https://oai.hconeai.com/v1", headers: { "Helicone-Auth": `Bearer sk-`, "Helicone-Property-Environment": process.env.NODE_ENV ?? "development", }, }); const { text } = await generateText({ model: openai("gpt-4-turbo"), system: hprompt`Give me a short response!`, prompt: hprompt`${{ color: "blue" }} or green`, headers: { "Helicone-Prompt-Id": "hello", }, });
npm ls @opentelemetry/exporter-jaeger [email protected] /Users/justin/Documents/repos/promptzero/helicone/web └── (empty)
lookbk@ /Users/caelinsutch/Github/lookbk └─┬ @lookbk/[email protected] -> ./packages/next └─┬ @helicone/[email protected] └─┬ @traceloop/[email protected] └── @opentelemetry/[email protected]