작성자 없음
작성자 정보가 삭제된 글입니다.
작성
·
904
0
import os
import openai
openai.api_key = "내꺼 api key 가림"
completion = openai.ChatCompletion.create( model = "gpt-3.5-turbo", messages=[{"role": "user", "connect": "Hello"}])
print(completion.choices[0].message)
Traceback (most recent call last):
File "C:\Users\82109\PycharmProjects\10.selenium_option\venv\openai_test.py", line 5, in <module>
completion = openai.ChatCompletion.create( model = "gpt-3.5-turbo", messages=[{"role": "user", "connect": "Hello"}])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\82109\PycharmProjects\10.selenium_option\venv\Lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\82109\PycharmProjects\10.selenium_option\venv\Lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
^^^^^^^^^^^^^^^^^^
File "C:\Users\82109\PycharmProjects\10.selenium_option\venv\Lib\site-packages\openai\api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\82109\PycharmProjects\10.selenium_option\venv\Lib\site-packages\openai\api_requestor.py", line 620, in _interpret_response
self._interpret_response_line(
File "C:\Users\82109\PycharmProjects\10.selenium_option\venv\Lib\site-packages\openai\api_requestor.py", line 683, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: Additional properties are not allowed ('connect' was unexpected) - 'messages.0'
Process finished with exit code 1
위는 에러 메시지 입니다.