Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求返回401 #20

Open
DMC-HYX opened this issue Jul 14, 2023 · 1 comment
Open

请求返回401 #20

DMC-HYX opened this issue Jul 14, 2023 · 1 comment

Comments

@DMC-HYX
Copy link

DMC-HYX commented Jul 14, 2023

Attaching to claude-to-chatgpt
claude-to-chatgpt | INFO: Started server process [1]
claude-to-chatgpt | INFO: Waiting for application startup.
claude-to-chatgpt | INFO: Application startup complete.
claude-to-chatgpt | INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
claude-to-chatgpt | INFO: 172.31.0.1:40810 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
claude-to-chatgpt | ERROR: Exception in ASGI application
claude-to-chatgpt | Traceback (most recent call last):
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 428, in run_asgi
claude-to-chatgpt | result = await app( # type: ignore[func-returns-value]
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
claude-to-chatgpt | return await self.app(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/fastapi/applications.py", line 276, in call
claude-to-chatgpt | await super().call(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/applications.py", line 122, in call
claude-to-chatgpt | await self.middleware_stack(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in call
claude-to-chatgpt | raise exc
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in call
claude-to-chatgpt | await self.app(scope, receive, _send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/middleware/cors.py", line 84, in call
claude-to-chatgpt | await self.app(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in call
claude-to-chatgpt | raise exc
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in call
claude-to-chatgpt | await self.app(scope, receive, sender)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
claude-to-chatgpt | raise e
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
claude-to-chatgpt | await self.app(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 718, in call
claude-to-chatgpt | await route.handle(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
claude-to-chatgpt | await self.app(scope, receive, send)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
claude-to-chatgpt | response = await func(request)
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/fastapi/routing.py", line 237, in app
claude-to-chatgpt | raw_response = await run_endpoint_function(
claude-to-chatgpt | File "/root/.cache/pypoetry/virtualenvs/claude-to-chatgpt-9TtSrW0h-py3.9/lib/python3.9/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
claude-to-chatgpt | return await dependant.call(**values)
claude-to-chatgpt | File "/app/claude_to_chatgpt/app.py", line 49, in chat
claude-to-chatgpt | openai_response = await response.anext()
claude-to-chatgpt | File "/app/claude_to_chatgpt/adapter.py", line 148, in chat
claude-to-chatgpt | raise Exception(f"Error: {response.status_code}")
claude-to-chatgpt | Exception: Error: 401

@caicai1998
Copy link

同样遇到该问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants