fix(imports): remove redundant import of models_params in __main__.py for cleaner code

style(fallback_handler.py): format error message for better readability
style(test_llm.py): format exception assertion for better readability
This commit is contained in:
Ariel Frischer 2025-02-14 13:54:36 -08:00
parent 27400d6225
commit 56ddd967c0
3 changed files with 7 additions and 4 deletions

View File

@ -8,7 +8,6 @@ from langgraph.checkpoint.memory import MemorySaver
from rich.console import Console
from rich.panel import Panel
from rich.text import Text
from ra_aid.models_params import models_params
from ra_aid import print_error, print_stage_header
from ra_aid.__version__ import __version__
@ -29,7 +28,7 @@ from ra_aid.dependencies import check_dependencies
from ra_aid.env import validate_environment
from ra_aid.llm import initialize_llm
from ra_aid.logging_config import get_logger, setup_logging
from ra_aid.models_params import DEFAULT_TEMPERATURE
from ra_aid.models_params import DEFAULT_TEMPERATURE, models_params
from ra_aid.project_info import format_project_info, get_project_info
from ra_aid.prompts import CHAT_PROMPT, WEB_RESEARCH_PROMPT_SECTION_CHAT
from ra_aid.tool_configs import get_chat_tools

View File

@ -349,7 +349,9 @@ class FallbackHandler:
):
return self.current_tool_to_bind.invoke(arguments)
else:
raise FallbackToolExecutionError(f"Tool '{name}' not found in available tools.")
raise FallbackToolExecutionError(
f"Tool '{name}' not found in available tools."
)
def base_message_to_tool_call_dict(self, response: BaseMessage):
"""

View File

@ -237,7 +237,9 @@ def test_initialize_openai_compatible(clean_env, mock_openai):
def test_initialize_unsupported_provider(clean_env):
"""Test initialization with unsupported provider raises ValueError"""
with pytest.raises(ValueError, match=r"Missing required environment variable for provider: unknown"):
with pytest.raises(
ValueError, match=r"Missing required environment variable for provider: unknown"
):
initialize_llm("unknown", "model")