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

ChatGpt notebooks should be updated to openai 1.0.0 and newer #402

Open
ejgutierrez74 opened this issue Feb 25, 2024 · 0 comments
Open

ChatGpt notebooks should be updated to openai 1.0.0 and newer #402

ejgutierrez74 opened this issue Feb 25, 2024 · 0 comments

Comments

@ejgutierrez74
Copy link

In general, but i have met:

ChatGpt should be updated as from 1.0.0 openai and newer the api has changed, could use grit to migrate....
https://app.grit.io/migrations/new/openai


from openai import OpenAI

client = OpenAI()

response = client.moderations.create(input=final_response_to_customer)

and

from openai import OpenAI

client = OpenAI()

completion = client.completions.create(model="davinci-002", prompt="Hello world")
chat_completion = client.chat.completions.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hello world"}])
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