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

Update chat completion function. #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

stu00608
Copy link

In the newer version of OpenAI Python package, openai.ChatCompletion has been deprecated.
The problem also has mentioned in Issue #24 and #30.

Changes

  1. openai.ChatCompletion.create() -> openai.chat.completions.create()
  2. The parameter headers -> extra_headers. Notice that I haven't tested with Portkey but when HEADERS is an empty dictionary it works.

Let me know if anything incorrect or missing.
Btw this is a very useful tool, thanks!

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