fix: force reload module to avoid cached version
This commit is contained in:
1 parent
7fd3bfd26b
commit
8528068995
1 file changed
+5
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user