Prompt Toolbox v2live prototype

General work / Playbook

ChatGPT API conversion

Playbook: today Open AI released a brand new ChatGPT API very different from davinci.

Save to workshop
Uses
116
Views
1.9k
State
Active
Evidence
Last updated Mar 2, 2023

Typed inputs

Compile preview

Blocks

Use the right block

3 total
Step

Step 1

today Open AI released a brand new ChatGPT API very different from davinci. turn this into [language] "curl https://api.openai.com/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
  "model": "gpt-3.5-turbo",
  "messages": [{"role": "user", "content": "Hello!"}]
}'" but with only these messages "messages=[
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Who won the world series in 2020?"},
    {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
    {"role": "user", "content": "Where was it played?"}
]". Do not try and use text-davinci-002.
Step

Step 2

add error catching for debugging
Step

Step 3

im getting error "[error]"
Copied