crewAI-tools icon indicating copy to clipboard operation
crewAI-tools copied to clipboard

XMLSearchTool with ollama

Open fre391 opened this issue 1 year ago • 1 comments

Does not work when using ollama locally:

` from crewai_tools import XMLSearchTool

xml_search_tool = XMLSearchTool( xml="test.xml", config=dict( llm=dict( provider="ollama", config=dict( model="llama3.1", ), ), embedder=dict( provider="ollama", config=dict( model="mxbai-embed-large", ), ), ) ) `

I get:

urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>

fre391 avatar Aug 08 '24 14:08 fre391

I got everything working with this:

os.environ['OPENAI_API_BASE'] = 'http://localhost:11434'
os.environ['OPENAI_MODEL_NAME'] = 'ollama/llama3.2'
os.environ['OPENAI_API_KEY'] = 'NA'

Note: Using this will make this your default llm, no need to configure everything separately

siddas27 avatar Dec 05 '24 05:12 siddas27