-
Notifications
You must be signed in to change notification settings - Fork 24
docs: Improve documentation around createCompletion
vs createChatCompletion
#23
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
Comments
Can you share some code to reproduce this issue? |
Never mind. I got it working. You can close the ticket now. The following does work. console.log(chatCompletion.choices); |
We should make it clearer in the docs. Thank you for raising this issue! |
createCompletion
vs createChatCompletion
we might aswell make a full doc site with pyro |
Not a bad idea. |
Another queestion, I have a web front end calling a REST function that uses the openAI.createChatCompletion(); |
You you provide a github repo with a reproduction of the issue? It only has to include an API route. |
Yes. I have a repo. https://github.com/raygao/uxig |
In the code you provide, you return a return new Response(results); instead of return results; |
Okay I think I found the bug. You fetch the api route using const result = await fetch(url, theScenario); when you should be doing const result = await fetch(url, { body: theScenario }); |
Amazing how fast, you guys respond! Much appreciate for the help. |
Nice, good to here that the bug is fixed! |
Please find the result running app at: https://comfortable-hawk-99.deno.dev/ |
Reopening so that we can improve docs, happy to hear you were able to deploy your app! |
Error: invalid_request_error: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?
This is the feedback from ChatGPT 3.5 nowadays. out-of-date
The text was updated successfully, but these errors were encountered: