Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMLSearchTool with ollama #88

Open
fre391 opened this issue Aug 8, 2024 · 1 comment
Open

XMLSearchTool with ollama #88

fre391 opened this issue Aug 8, 2024 · 1 comment

Comments

@fre391
Copy link

fre391 commented Aug 8, 2024

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)>

@siddas27
Copy link
Contributor

siddas27 commented Dec 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants