Revert "feat(core): Add stream data return and reception"

This reverts commit 7706b88f03.
This commit is contained in:
leiwu30 2024-03-28 09:38:44 +08:00
parent 29fecffa3f
commit 923150b2f3
13 changed files with 3 additions and 211 deletions

View file

@ -23,7 +23,6 @@ from metagpt.schema import (
TestingContext,
)
from metagpt.utils.project_repo import ProjectRepo
from metagpt.utils.stream_pipe import StreamPipe
class Action(SerializationMixin, ContextMixin, BaseModel):
@ -36,7 +35,6 @@ class Action(SerializationMixin, ContextMixin, BaseModel):
prefix: str = "" # aask*时会加上prefix作为system_message
desc: str = "" # for skill manager
node: ActionNode = Field(default=None, exclude=True)
stream_pipe: Optional[StreamPipe] = None
@property
def repo(self) -> ProjectRepo:
@ -92,8 +90,6 @@ class Action(SerializationMixin, ContextMixin, BaseModel):
async def _aask(self, prompt: str, system_msgs: Optional[list[str]] = None) -> str:
"""Append default prefix"""
if self.stream_pipe and not self.llm.stream_pipe:
self.llm.stream_pipe = self.stream_pipe
return await self.llm.aask(prompt, system_msgs)
async def _run_action_node(self, *args, **kwargs):