copilot fixes

This commit is contained in:
2025-10-20 21:58:52 +02:00
parent 9a2b4721fa
commit 2fbdcca892
6 changed files with 14 additions and 7 deletions

View File

@@ -45,12 +45,14 @@ class PipelineInputs:
"""
Sceglie il modello LLM da usare per il Team Leader.
"""
assert index >= 0 and index < len(self.configs.models.all_models), "Index out of range for models list."
self.team_leader_model = self.configs.models.all_models[index]
def choose_team(self, index: int):
"""
Sceglie il modello LLM da usare per il Team.
"""
assert index >= 0 and index < len(self.configs.models.all_models), "Index out of range for models list."
self.team_model = self.configs.models.all_models[index]
def choose_strategy(self, index: int):

View File

@@ -46,6 +46,11 @@ class Pipeline:
"""
def __init__(self, inputs: PipelineInputs):
"""
Inizializza la pipeline con gli input forniti.
Args:
inputs: istanza di PipelineInputs contenente le configurazioni e i parametri della pipeline.
"""
self.inputs = inputs
def interact(self, listeners: list[tuple[PipelineEvent, Callable[[Any], None]]] = []) -> str:

View File

@@ -12,7 +12,7 @@ class Task(TypedDict):
class PlanMemoryTool(Toolkit):
def __init__(self):
self.tasks: list[Task] = []
Toolkit.__init__(self, # type: ignore
Toolkit.__init__(self, # type: ignore[call-arg]
instructions="This tool manages an execution plan. Add tasks, get the next pending task, update a task's status (completed, failed) and result, or list all tasks.",
tools=[
self.add_tasks,

View File

@@ -14,5 +14,5 @@ GOAL: check if the query is crypto-related
3) Ouput the result:
- if is crypto related then output the query
- if is not crypto related, then output why is not releated in a brief message
- if is not crypto related, then output why is not related in a brief message

View File

@@ -12,7 +12,7 @@ class TestQueryCheckAgent:
self.agent = self.model.get_agent(QUERY_CHECK_INSTRUCTIONS, output_schema=QueryOutputs)
def test_query_not_ok(self):
response = self.agent.run("Is the sky blue?") #type: ignore
response = self.agent.run("Is the sky blue?") # type: ignore
assert response is not None
assert response.content is not None
content = response.content
@@ -20,7 +20,7 @@ class TestQueryCheckAgent:
assert content.is_crypto == False
def test_query_not_ok2(self):
response = self.agent.run("What is the capital of France?") #type: ignore
response = self.agent.run("What is the capital of France?") # type: ignore
assert response is not None
assert response.content is not None
content = response.content
@@ -28,7 +28,7 @@ class TestQueryCheckAgent:
assert content.is_crypto == False
def test_query_ok(self):
response = self.agent.run("Bitcoin") #type: ignore
response = self.agent.run("Bitcoin") # type: ignore
assert response is not None
assert response.content is not None
content = response.content
@@ -36,7 +36,7 @@ class TestQueryCheckAgent:
assert content.is_crypto == True
def test_query_ok2(self):
response = self.agent.run("Ha senso investire in Ethereum?") #type: ignore
response = self.agent.run("Ha senso investire in Ethereum?") # type: ignore
assert response is not None
assert response.content is not None
content = response.content

View File

@@ -19,7 +19,7 @@ class TestReportGenerationAgent:
No significant regulatory news has been reported and the social media sentiment remains unknown.
"""
response = self.agent.run(sample_data) #type: ignore
response = self.agent.run(sample_data) # type: ignore
assert response is not None
assert response.content is not None
content = response.content