diff --git a/main.py b/main.py index 7ef87e9..24d7684 100644 --- a/main.py +++ b/main.py @@ -429,7 +429,12 @@ def create_langcode_agent(system_prompt: Optional[str] = None, use_simple_agent: # Use OllamaToolAgent for Ollama with tool calling if is_ollama and not use_simple_agent: try: + # Force reload the module + import importlib + import ollama_agent + importlib.reload(ollama_agent) from ollama_agent import create_ollama_tool_agent + model = load_model_from_config() custom_tools = get_custom_tools()