Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render function not supporting OpenAI Assistants #411

Open
rcamp004 opened this issue Sep 5, 2024 · 0 comments
Open

Render function not supporting OpenAI Assistants #411

rcamp004 opened this issue Sep 5, 2024 · 0 comments

Comments

@rcamp004
Copy link

rcamp004 commented Sep 5, 2024

When I replace model name with an OpenAI assistant number the chat falls over.
I note within the code for: index.d.ts > render there is a comment saying it supports OpenAI assistants.

declare function render<TS extends { [name: string]: z.Schema; } = {}, FS extends { [name: string]: z.Schema; } = {}>(options: { /** * The model name to use. Must be OpenAI SDK compatible. Tools and Functions are only supported * GPT models (3.5/4), OpenAI Assistants, Mistral small and large, and Fireworks firefunction-v1. * * @example "gpt-3.5-turbo" */ model: string; /** * The provider instance to use. Currently the only provider available is OpenAI. * This needs to match the model name.
I call it with:
const ui = render({ model: process.env.local.assistant, provider: openai, initial: <SpinnerMessage />,

I get a runtime error in terminal:
status: 404,
headers: {
'alt-svc': 'h3=":443"; ma=86400',
'cf-cache-status': 'DYNAMIC',
'cf-ray': '8be7a5be5e549578-LHR',
connection: 'keep-alive',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=utf-8',
date: 'Thu, 05 Sep 2024 16:38:03 GMT',
server: 'cloudflare',
'set-cookie': '__cf_bm=KvdCEcH8UzKEfyrVBLP.Kf3qlNHcIHytsxYGpd98uOg-1725554283-1.0.1.1-eN0ZPD6TCqAekjSTosh1nelL9CW94bTqriCi3bFwXXa11UujaPFq0jO_MWg2R6K4l89bTk3pAXi1fYdsYcUNrw; path=/; expires=Thu, 05-Sep-24 17:08:03 GMT; ___domain=.api.openai.com; HttpOnly; Secure; SameSite=None, _cfuvid=jju7quKYNkPRnzje7EibbCPK1L.q3.VFLdsyn1VbXmk-1725554283397-0.0.1.1-604800000; path=/; ___domain=.api.openai.com; HttpOnly; Secure; SameSite=None',
'strict-transport-security': 'max-age=15552000; includeSubDomains; preload',
'transfer-encoding': 'chunked',
vary: 'Origin',
'x-content-type-options': 'nosniff',
'x-request-id': 'req_fc82c566345863eb8dba10f322c0d760'
},
request_id: 'req_fc82c566345863eb8dba10f322c0d760',
error: {
message: 'The model asst_****rQi does not exist or you do not have access to it.',
type: 'invalid_request_error',
param: null,
code: 'model_not_found'
},
code: 'model_not_found',
param: null,
type: 'invalid_request_error'
}
NotFoundError: 404 The model asst_****rQi does not exist or you do not have access to it.
at APIError.generate (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected]/node_modules/openai/error.mjs:69:20)
at OpenAI.makeStatusError (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected]/node_modules/openai/core.mjs:304:65)
at OpenAI.makeRequest (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected]/node_modules/openai/core.mjs:347:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async eval (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/ai/rsc/dist/rsc-server.mjs:1076:36)

I've been stuck on this since March so this is less an issue and more of a request for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant