feat : frontend message streaming
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import asyncio
|
||||
|
||||
from sources.utility import pretty_print, animate_thinking
|
||||
from sources.agents.agent import Agent
|
||||
@@ -17,10 +18,10 @@ class CasualAgent(Agent):
|
||||
self.role = "talk"
|
||||
self.type = "casual_agent"
|
||||
|
||||
def process(self, prompt, speech_module) -> str:
|
||||
async def process(self, prompt, speech_module) -> str:
|
||||
self.memory.push('user', prompt)
|
||||
animate_thinking("Thinking...", color="status")
|
||||
answer, reasoning = self.llm_request()
|
||||
answer, reasoning = await self.llm_request()
|
||||
self.last_answer = answer
|
||||
return answer, reasoning
|
||||
|
||||
|
||||
Reference in New Issue
Block a user