OpenAI API 키 설정

다음 명령어를 실행하면 어떤 출력이 나올까요?

curl https://api.openai.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $OPENAI_API_KEY"   -d '{
    "model": "gpt-4",
    "messages": [
      {
        "role": "system",
        "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."
      },
      {
        "role": "user",
        "content": "Compose a poem that explains the concept of recursion in programming."
      }
    ]
  }'

Discourse 서버에서 실행할 때, 명령어에 API 키를 넣는 것을 잊지 마세요.

3개의 좋아요