1. Introduction on GenAI API
Basic setup for the chatbot
How to set up your API Key
REACT_APP_OPENAI_API_KEY=your_api_key_hereMaking Your First API Call
/curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello, Chat GPT!"}],
"temperature": 0.7
}'
Last updated