Skip to content

fix: chat completion with openai api >= 1.0.0#13

Open
rrmn wants to merge 1 commit intoemmethalm:mainfrom
rrmn:fix-chat-completion-api
Open

fix: chat completion with openai api >= 1.0.0#13
rrmn wants to merge 1 commit intoemmethalm:mainfrom
rrmn:fix-chat-completion-api

Conversation

@rrmn
Copy link

@rrmn rrmn commented Jan 7, 2024

Error

You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0"

Fix

client.ChatCompletion.create --> client.chat.completions.create

Docs

E.g., see:

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

Successfully merging this pull request may close these issues.

1 participant