beckjiang / chatgpt-api Goto Github PK
View Code? Open in Web Editor NEWchatgpt-api is a tool that converts the functionality of the ChatGPT website into OpenAI Chat API protocol.
chatgpt-api is a tool that converts the functionality of the ChatGPT website into OpenAI Chat API protocol.
只支持/v1/chat/completions 这个接口吗
Hi:
my box is manjaro linux, I followed the guide and run:
curl http://127.0.0.1:8082/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer sk-test"
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Hello!"}]
}'
error happen:
chatgpt_api | Traceback (most recent call last):
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/revChatGPT/V1.py", line 668, in __check_response
chatgpt_api | response.raise_for_status()
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
chatgpt_api | raise HTTPError(http_error_msg, response=self)
chatgpt_api | requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://ai.fakeopen.com/api/conversation
chatgpt_api |
chatgpt_api | The above exception was the direct cause of the following exception:
chatgpt_api |
chatgpt_api | Traceback (most recent call last):
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/gevent/pywsgi.py", line 999, in handle_one_response
chatgpt_api | self.run_application()
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/gevent/pywsgi.py", line 946, in run_application
chatgpt_api | self.process_result()
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/gevent/pywsgi.py", line 930, in process_result
chatgpt_api | for data in self.result:
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/werkzeug/wsgi.py", line 281, in next
chatgpt_api | return self._next()
chatgpt_api | ^^^^^^^^^^^^
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/werkzeug/wrappers/response.py", line 31, in _iter_encoded
chatgpt_api | for item in iterable:
chatgpt_api | File "/app/ChatGPTServer.py", line 135, in send_chunked_response
chatgpt_api | raise e
chatgpt_api | File "/app/ChatGPTServer.py", line 131, in send_chunked_response
chatgpt_api | yield from self.execute_chat_response(chatbot, scene_id, email, stream, message, conversation_id, parent_id, model)
chatgpt_api | File "/app/ChatGPTServer.py", line 91, in execute_chat_response
chatgpt_api | for data in chatbot.ask(prompt=message, conversation_id=conversation_id, parent_id=parent_id, model=model):
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/revChatGPT/V1.py", line 556, in ask
chatgpt_api | yield from self.post_messages(
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/revChatGPT/V1.py", line 510, in post_messages
chatgpt_api | yield from self.__send_request(
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/revChatGPT/V1.py", line 365, in __send_request
chatgpt_api | self.__check_response(response)
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/revChatGPT/V1.py", line 66, in wrapper
chatgpt_api | out = func(*args, **kwargs)
chatgpt_api | ^^^^^^^^^^^^^^^^^^^^^
chatgpt_api | File "/usr/local/lib/python3.11/site-packages/revChatGPT/V1.py", line 675, in __check_response
chatgpt_api | raise error from ex
chatgpt_api | revChatGPT.typings.Error: OpenAI: {"detail":{"message":"Unauthorized - Invalid access token"}} (code: 401)
chatgpt_api | Please check that the input is correct, or you can resolve this issue by filing an issue
chatgpt_api | Project URL: https://github.com/acheong08/ChatGPT
chatgpt_api | 2023-05-09T12:51:26Z {'REMOTE_ADDR': '::ffff:172.18.0.1', 'REMOTE_PORT': '50496', 'HTTP_HOST': '127.0.0.1:8082', (hidden keys: 23)} failed with Error
chatgpt_api |
chatgpt_api | ::ffff:172.18.0.1 - - [2023-05-09 12:51:26] "POST /v1/chat/completions HTTP/1.1" 500 161 1.040661
thanks for your any response.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.