diff --git a/README.md b/README.md index 44c1e67..6b92ec7 100644 --- a/README.md +++ b/README.md @@ -399,7 +399,7 @@ For example: If you would like to run with a "Headful" browser, you can set the ```json { - "mistral-large-agente": { + "mistral-large": { "planner_agent": { "model_name": "mistral", "model_api_key": "", diff --git a/agents_llm_config-example.json b/agents_llm_config-example.json index 742c7c4..7a84725 100644 --- a/agents_llm_config-example.json +++ b/agents_llm_config-example.json @@ -1,5 +1,5 @@ { - "mistral-large-agente": { + "mistral-large": { "planner_agent": { "model_name": "mistral", "model_api_key": "", diff --git a/testzeus_hercules/__main__.py b/testzeus_hercules/__main__.py index b851244..ffe0801 100644 --- a/testzeus_hercules/__main__.py +++ b/testzeus_hercules/__main__.py @@ -74,7 +74,9 @@ def sequential_process() -> None: asyncio.run(runner.start()) runner_result = {} - cost_metrics = runner.result.cost or {} + cost_metrics = {} + if runner.result and runner.result.cost: + cost_metrics = runner.result.cost execution_time = runner.execution_time if runner.result and runner.result.chat_history: s_rr = runner.result.chat_history[-1]["content"] diff --git a/testzeus_hercules/core/runner.py b/testzeus_hercules/core/runner.py index 3a8e3c4..d3145f2 100644 --- a/testzeus_hercules/core/runner.py +++ b/testzeus_hercules/core/runner.py @@ -102,9 +102,10 @@ async def process_command(self, command: str) -> tuple[Any, float]: await self.browser_manager.update_processing_state("done") # type: ignore end_time = time.time() elapsed_time = round(end_time - start_time, 2) - logger.info(f'Command "{command}" took: {elapsed_time} seconds. and total cost metric is {result.cost}') # type: ignore + await self.save_planner_chat_messages() if result is not None: + logger.info(f'Command "{command}" took: {elapsed_time} seconds. and total cost metric is {result.cost}') # type: ignore chat_history = result.chat_history # type: ignore last_message = chat_history[-1] if chat_history else None # type: ignore if (