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

Does Ollama support external API calls? #9

Open
JAVA-LW opened this issue Jan 3, 2025 · 2 comments
Open

Does Ollama support external API calls? #9

JAVA-LW opened this issue Jan 3, 2025 · 2 comments

Comments

@JAVA-LW
Copy link

JAVA-LW commented Jan 3, 2025

The project can support specifying a basic URL to call Ollam's model?

@Yuvraj-Dhepe
Copy link

Yes Please, a crucial feature if Ollama is not being run locally.

@Yuvraj-Dhepe
Copy link

@JAVA-LW I think the pip package hasn't updated by @imanoop7, however, if you simply use the github repo it is working. The simple fix on pip installed package, is to define a kwarg of base url in the OCRProcessor init block as in here:

class OCRProcessor:
def __init__(self, model_name: str = "llama3.2-vision:11b",
base_url: str = "http://localhost:11434/api/generate",
max_workers: int = 1):
self.model_name = model_name
self.base_url = base_url
self.max_workers = max_workers

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