mirror of
https://github.com/HKUDS/OpenSpace.git
synced 2026-09-09 22:31:03 +00:00
Use get_running_loop instead of get_event_loop
asyncio.get_event_loop() is deprecated in Python 3.10+; use asyncio.get_running_loop() instead.
This commit is contained in:
parent
a0b1222403
commit
1cf7953d68
1 changed files with 2 additions and 2 deletions
|
|
@ -349,7 +349,7 @@ class OpenSpace:
|
|||
self._running = True
|
||||
self._task_done.clear()
|
||||
self._last_evolved_skills = [] # Reset per-execution tracking
|
||||
start_time = asyncio.get_event_loop().time()
|
||||
start_time = asyncio.get_running_loop().time()
|
||||
# Use external task_id if provided, otherwise generate one
|
||||
if task_id is None:
|
||||
task_id = f"task_{uuid.uuid4().hex[:12]}"
|
||||
|
|
@ -933,4 +933,4 @@ class OpenSpace:
|
|||
if self._running:
|
||||
status = "running"
|
||||
backends = ", ".join(self.config.backend_scope) if self.config.backend_scope else "all"
|
||||
return f"<OpenSpace(status={status}, backends={backends}, model={self.config.llm_model})>"
|
||||
return f"<OpenSpace(status={status}, backends={backends}, model={self.config.llm_model})>"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue