Prompt-Engineering-Guide
Prompt-Engineering-Guide copied to clipboard
ChatGpt notebooks should be updated to openai 1.0.0 and newer
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"}])