I went through chat gpt’s intro ai code but got into following:
Traceback (most recent call last):
File "/home/guyen/gg/git/codelab/gpu/ml/chatpgt/chat-1.py", line 4, in <module>
openai.ChatCompletion.create(model="gpt-3.5-turbo",
File "/home/guyen/.local/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/home/guyen/.local/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/home/guyen/.local/lib/python3.9/site-packages/openai/api_requestor.py", line 230, in request
resp, got_stream = self._interpret_response(result, stream)
File "/home/guyen/.local/lib/python3.9/site-packages/openai/api_requestor.py", line 624, in _interpret_response
self._interpret_response_line(
File "/home/guyen/.local/lib/python3.9/site-packages/openai/api_requestor.py", line 687, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.
[guyen@localhost chatpgt]$ cat
chat-1.py run.sh
[guyen@localhost chatpgt]$ cat
chat-1.py run.sh
[guyen@localhost chatpgt]$ cat chat-1.py
import openai
openai.api_key='■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■NSIZcq1w'
openai.ChatCompletion.create(model="gpt-3.5-turbo",
message=[
{"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?"}
]
)
I signed up for CHATgpt 20$ but that appears just usage. Do i have to sign for any add’l services for the above code to work?