Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

fix conflict

seehi0c29c298c28b
diff --cc metagpt/logs.py
index 663b75318,bfb8c9265..aea889837
--- a/metagpt/logs.py
+++ b/metagpt/logs.py
@@@ -8,9 -8,8 +8,10 @@@
from __future__ import annotations
+import asyncio
+ import inspect
import sys
+from contextvars import ContextVar
from datetime import datetime
from functools import partial
from typing import Any
@@@ -106,21 -102,4 +120,23 @@@ async def _tool_output_log_async(*args
pass
+def create_llm_stream_queue():
+ """Creates a new LLM stream queue and sets it in the context variable.
+
+ Returns:
+ The newly created asyncio.Queue instance.
+ """
+ queue = asyncio.Queue()
+ LLM_STREAM_QUEUE.set(queue)
+ return queue
+
+
+def get_llm_stream_queue():
+ """Retrieves the current LLM stream queue from the context variable.
+
+ Returns:
+ The asyncio.Queue instance if set, otherwise None.
+ """
+ return LLM_STREAM_QUEUE.get(None)
++
+ _get_human_input = input # get human input from console by default