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

Ollama uses localhost as api_base instead of given api_base #183

Open
Praj-17 opened this issue Oct 19, 2024 · 0 comments
Open

Ollama uses localhost as api_base instead of given api_base #183

Praj-17 opened this issue Oct 19, 2024 · 0 comments

Comments

@Praj-17
Copy link

Praj-17 commented Oct 19, 2024

Hi, I'm coming back to this issue again. I have my ollama server on the URL as present in the original code. However, crawl4ai still uses the local llama that has been downloaded on the machine running the original code instead of running llama from the given API base.

However, this code from the Litellm docs, works perfectly.

from litellm import completion

response = completion(
    model="ollama/llama2", 
    messages=[{ "content": "respond in 20 words. who are you?","role": "user"}], 
    api_base="http://localhost:11434" # replacing this local host to my server endpoint
)
print(response)

I tried passing the api_base parameter in the AsyncWebCrawler but it doesn't help.

Any suggestions @unclecode ?

Originally posted by @Praj-17 in #166 (comment)

@Praj-17 Praj-17 changed the title Hi, I'm coming back to this issue again. I have my ollama server on the URL as present in the original code. However, crawl4ai still uses the local llama that has been downloaded on the machine running the original code instead of running llama from the given API base. Ollama uses localhost as api_base instead of given api_base Oct 19, 2024
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

1 participant