Jan 20 08:34:54 api python[70963]: INFO: 141.168.162.42:0 - "POST /chat/student/continue HTTP/1.0" 500 Internal Server Error
Jan 20 08:34:54 api python[70963]: ERROR: Exception in ASGI application
Jan 20 08:34:54 api python[70963]: Traceback (most recent call last):
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 419, in run_asgi
Jan 20 08:34:54 api python[70963]: result = await app( # type: ignore[func-returns-value]
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
Jan 20 08:34:54 api python[70963]: return await self.app(scope, receive, send)
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/fastapi/applications.py", line 270, in call
Jan 20 08:34:54 api python[70963]: await super().call(scope, receive, send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/applications.py", line 124, in call
Jan 20 08:34:54 api python[70963]: await self.middleware_stack(scope, receive, send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in call
Jan 20 08:34:54 api python[70963]: raise exc
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in call
Jan 20 08:34:54 api python[70963]: await self.app(scope, receive, _send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 92, in call
Jan 20 08:34:54 api python[70963]: await self.simple_response(scope, receive, send, request_headers=headers)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/middleware/cors.py", line 147, in simple_response
Jan 20 08:34:54 api python[70963]: await self.app(scope, receive, send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in call
Jan 20 08:34:54 api python[70963]: raise exc
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in call
Jan 20 08:34:54 api python[70963]: await self.app(scope, receive, sender)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
Jan 20 08:34:54 api python[70963]: raise e
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
Jan 20 08:34:54 api python[70963]: await self.app(scope, receive, send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 706, in call
Jan 20 08:34:54 api python[70963]: await route.handle(scope, receive, send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
Jan 20 08:34:54 api python[70963]: await self.app(scope, receive, send)
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
Jan 20 08:34:54 api python[70963]: response = await func(request)
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 235, in app
Jan 20 08:34:54 api python[70963]: raw_response = await run_endpoint_function(
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/fastapi/routing.py", line 161, in run_endpoint_function
Jan 20 08:34:54 api python[70963]: return await dependant.call(**values)
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/git/assistance.chat/src/python/assistance/api/routers/chat.py", line 103, in student_chat_continue
Jan 20 08:34:54 api python[70963]: response = await run_student_chat_response(
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/git/assistance.chat/src/python/assistance/conversations/student.py", line 115, in run_student_chat_response
Jan 20 08:34:54 api python[70963]: response = await call_gpt_and_store_as_transcript(
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/git/assistance.chat/src/python/assistance/conversations/student.py", line 133, in call_gpt_and_store_as_transcript
Jan 20 08:34:54 api python[70963]: completions = await openai.Completion.acreate(prompt=prompt, **model_kwargs)
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/openai/api_resources/completion.py", line 45, in acreate
Jan 20 08:34:54 api python[70963]: return await super().acreate(*args, **kwargs)
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 217, in acreate
Jan 20 08:34:54 api python[70963]: response, _, api_key = await requestor.arequest(
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 311, in arequest
Jan 20 08:34:54 api python[70963]: resp, got_stream = await self._interpret_async_response(result, stream)
Jan 20 08:34:54 api python[70963]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 646, in _interpret_async_response
Jan 20 08:34:54 api python[70963]: self._interpret_response_line(
Jan 20 08:34:54 api python[70963]: File "/home/simon/.cache/pypoetry/virtualenvs/assistance-zIqiKnAa-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 680, in _interpret_response_line
Jan 20 08:34:54 api python[70963]: raise self.handle_error_response(
Jan 20 08:34:54 api python[70963]: openai.error.RateLimitError: The model is currently overloaded with other requests (timed out after generating some tokens) - please retry with smaller completion length or fewer completions (requested 1 prompts, 2 completions for each)