Skip to content

Use of openAi assistant with @ai-sdk/openai #1851

Closed Answered by jeremyphilemon
defless asked this question in Help
Discussion options

You must be logged in to vote

@ai-sdk/openai can be only be used with the following core functions

  • generateText
  • streamText
  • generateObject
  • streamObject
  • embed

and hooks

  • useChat
  • useCompletion

Regarding useAssistant, it is a hook that abstracts only OpenAI's assistant endpoints, and does not use the core functions. That's why the examples explicitly use the openai library instead os @ai-sdk/openai.

So you're right that you don't have to use @ai-sdk/openai provider, you will need to import the actual openai library instead.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jeremyphilemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants