You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not so much an issue and I'm not developing qwik-docs-es. I was looking through this to find a way to use openai in qwik, I noticed this version is pre openai 4.0 ( which got revamped SDK ), not sure if you even care about updating it to use the new SDK methods. which would just change the custom fetch methods
possible upgrade ( unless I missed another type somewhere ), if not the qwik-gpt/search.tsx throws a namespace type error,
By just modifying it to this :
import type OpenAI from "openai";
export async function* chatCompletion(apiKey: string, request: OpenAI.Chat.ChatCompletionCreateParams) {...
Not so much an issue and I'm not developing qwik-docs-es. I was looking through this to find a way to use openai in qwik, I noticed this version is pre openai 4.0 ( which got revamped SDK ), not sure if you even care about updating it to use the new SDK methods. which would just change the custom fetch methods
embedding:
ref: https://platform.openai.com/docs/api-reference/embeddings/create
__
https://github.com/BuilderIO/qwik-docs-es/blob/main/src/components/qwik-gpt/search.tsx#L11
_
chat completions :
ref: https://platform.openai.com/docs/api-reference/streaming
__
https://github.com/BuilderIO/qwik-docs-es/blob/main/src/components/qwik-gpt/search.tsx#L77-L95
https://github.com/BuilderIO/qwik-docs-es/blob/main/src/components/qwik-gpt/streaming-gpt.ts#L1-L19
_
Don't have to refactor anything its basically the same and could just continue to use the fetch that you have and all that would need is to changed is the type in:
https://github.com/BuilderIO/qwik-docs-es/blob/main/src/components/qwik-gpt/streaming-gpt.ts#L1-L19
possible upgrade ( unless I missed another type somewhere ), if not the qwik-gpt/search.tsx throws a namespace type error,
By just modifying it to this :
v4.0+ the request types change
ref:
https://github.com/openai/openai-node?tab=readme-ov-file#request--response-types
The text was updated successfully, but these errors were encountered: