We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e0a0c commit 909e5afCopy full SHA for 909e5af
interpreter/server.py
@@ -36,19 +36,9 @@ def __init__(self, interpreter):
36
# Setup routes
37
self.app.post("/chat/completions")(self.chat_completion)
38
39
- # Add a field to track the current request task
40
- self._current_request: Optional[Task] = None
41
42
async def chat_completion(self, request: Request):
43
"""Main chat completion endpoint"""
44
- # Cancel any existing request
45
- if self._current_request and not self._current_request.done():
46
- self._current_request.cancel()
47
- try:
48
- await self._current_request
49
- except CancelledError:
50
- pass
51
-
52
body = await request.json()
53
if self.interpreter.debug:
54
print("Request body:", body)
0 commit comments