Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -108,7 +108,7 @@ class AnalysisConfig:
|
|
| 108 |
# API keys (populated from env or UI)
|
| 109 |
mistral_api_key: str = ""
|
| 110 |
gemini_api_key: str = ""
|
| 111 |
-
|
| 112 |
|
| 113 |
|
| 114 |
# ---------------------------------------------------------------------------
|
|
@@ -458,9 +458,9 @@ class PAJAISResearchAgent:
|
|
| 458 |
self,
|
| 459 |
mistral_key: str = '',
|
| 460 |
gemini_key: str = '',
|
| 461 |
-
|
| 462 |
) -> Optional[pd.DataFrame]:
|
| 463 |
-
"""Label clusters using 3 LLMs: Mistral + Gemini +
|
| 464 |
|
| 465 |
Majority vote selects the final label; all 3 candidates stored.
|
| 466 |
Can be called independently after phase 2.5.
|
|
@@ -478,7 +478,7 @@ class PAJAISResearchAgent:
|
|
| 478 |
embeddings=self.specter2_embeddings,
|
| 479 |
mistral_api_key=mistral_key or self.config.mistral_api_key,
|
| 480 |
gemini_api_key=gemini_key or self.config.gemini_api_key,
|
| 481 |
-
|
| 482 |
max_clusters=self.config.llm_label_max_clusters,
|
| 483 |
)
|
| 484 |
|
|
@@ -582,7 +582,7 @@ class PAJAISResearchAgent:
|
|
| 582 |
topic_df=self.topic_df,
|
| 583 |
mistral_api_key=self.config.mistral_api_key,
|
| 584 |
gemini_api_key=self.config.gemini_api_key,
|
| 585 |
-
|
| 586 |
)
|
| 587 |
|
| 588 |
# Persist council report
|
|
|
|
| 108 |
# API keys (populated from env or UI)
|
| 109 |
mistral_api_key: str = ""
|
| 110 |
gemini_api_key: str = ""
|
| 111 |
+
ollama_url: str = "http://localhost:11434" # Local Ollama URL
|
| 112 |
|
| 113 |
|
| 114 |
# ---------------------------------------------------------------------------
|
|
|
|
| 458 |
self,
|
| 459 |
mistral_key: str = '',
|
| 460 |
gemini_key: str = '',
|
| 461 |
+
ollama_url: str = '',
|
| 462 |
) -> Optional[pd.DataFrame]:
|
| 463 |
+
"""Label clusters using 3 LLMs: Mistral + Gemini + Ollama.
|
| 464 |
|
| 465 |
Majority vote selects the final label; all 3 candidates stored.
|
| 466 |
Can be called independently after phase 2.5.
|
|
|
|
| 478 |
embeddings=self.specter2_embeddings,
|
| 479 |
mistral_api_key=mistral_key or self.config.mistral_api_key,
|
| 480 |
gemini_api_key=gemini_key or self.config.gemini_api_key,
|
| 481 |
+
ollama_url=ollama_url or self.config.ollama_url,
|
| 482 |
max_clusters=self.config.llm_label_max_clusters,
|
| 483 |
)
|
| 484 |
|
|
|
|
| 582 |
topic_df=self.topic_df,
|
| 583 |
mistral_api_key=self.config.mistral_api_key,
|
| 584 |
gemini_api_key=self.config.gemini_api_key,
|
| 585 |
+
ollama_url=self.config.ollama_url,
|
| 586 |
)
|
| 587 |
|
| 588 |
# Persist council report
|