Skip to content

Commit 909e5af

Browse files
committed
remove unused current task
1 parent 93e0a0c commit 909e5af

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

interpreter/server.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,9 @@ def __init__(self, interpreter):
3636
# Setup routes
3737
self.app.post("/chat/completions")(self.chat_completion)
3838

39-
# Add a field to track the current request task
40-
self._current_request: Optional[Task] = None
4139

4240
async def chat_completion(self, request: Request):
4341
"""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-
5242
body = await request.json()
5343
if self.interpreter.debug:
5444
print("Request body:", body)

0 commit comments

Comments
 (0)