Team Workflow aggiornato (#37)
* Rimuovi la classe Predictor e aggiorna le importazioni in Pipeline e __init__.py * Aggiungi modelli per l'analisi delle query e la generazione di report; aggiorna le configurazioni degli agenti * Tests for report generation and team agent responses * Aggiorna i prompt degli agenti * Changed defaults models * Aggiunta della classe PlanMemoryTool per la gestione dei task e aggiornamento della logica del team leader per un'esecuzione più dinamica del piano.
This commit was merged in pull request #37.
This commit is contained in:
committed by
GitHub
parent
885a70d748
commit
12339ccbff
37
tests/agents/test_team.py
Normal file
37
tests/agents/test_team.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import asyncio
|
||||
import pytest
|
||||
from app.agents.core import PipelineInputs
|
||||
from app.agents.prompts import *
|
||||
from app.configs import AppConfig
|
||||
|
||||
|
||||
# fix warning about no event loop
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def event_loop():
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
yield loop
|
||||
loop.close()
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
class TestTeamAgent:
|
||||
@pytest.fixture(autouse=True)
|
||||
def setup(self):
|
||||
self.configs = AppConfig.load()
|
||||
self.configs.agents.team_model = "qwen3:1.7b"
|
||||
self.configs.agents.team_leader_model = "qwen3:1.7b"
|
||||
self.inputs = PipelineInputs(self.configs)
|
||||
self.team = self.inputs.get_agent_team()
|
||||
|
||||
def test_team_agent_response(self):
|
||||
self.inputs.user_query = "Is Bitcoin a good investment now?"
|
||||
inputs = self.inputs.get_query_inputs()
|
||||
response = self.team.run(inputs) # type: ignore
|
||||
|
||||
assert response is not None
|
||||
assert response.content is not None
|
||||
content = response.content
|
||||
print(content)
|
||||
assert isinstance(content, str)
|
||||
assert "Bitcoin" in content
|
||||
Reference in New Issue
Block a user