Helicone / helicone

https://www.helicone.ai
Apache License 2.0
1.48k stars 156 forks source link

Vercel AI SDK Config Example #2152

Open Yonom opened 3 weeks ago

Yonom commented 3 weeks ago

Hey, I saw that there's an example missing for the Vercel AI SDK. Here's what I had to do to set helicone up

-import { openai } from "@ai-sdk/openai";
+import { createOpenAI } from "@ai-sdk/openai";

+const openai = createOpenAI({
+  baseURL: "https://oai.hconeai.com/v1",
+  headers: {
+    "Helicone-Auth": "Bearer pk-helicone-xx",
+  },
+});

Let me know if this is interesting to add to the repo

MaryOfLA commented 1 week ago

What about using groq? The groq baseURL is needed.