dair-ai / dair-ai/Prompt-Engineering-Guide

ChatGpt notebooks should be updated to openai 1.0.0 and newer

Open
#402 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
78.3k
Forks
8.6k
PR merge metrics
No merged PRs in 30d

Description

In general, but i have met:

- https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-chatgpt-intro.ipynb
- https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-chatgpt-adversarial.ipynb
- https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-chatgpt-adversarial.ipynb

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"}])
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with notebooks/pe-chatgpt-intro.ipynb and notebooks/pe-chatgpt-adversarial.ipynb, then identify any other notebooks using the pre-1.0.0 OpenAI API. Review the linked migration guidance and run the affected cells; done means the notebooks use the newer client calls and execute without API compatibility errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
ai, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.