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

fix : use ollamacontainer endpoint #680

Closed
wants to merge 1 commit into from

Conversation

rajadilipkolli
Copy link

Instead of manually setting the url use containers OOTB URL

instead of manually setting the url use containers OOTB URL
@@ -73,7 +73,7 @@ public static void beforeAll() throws IOException, InterruptedException {
ollamaContainer.execInContainer("ollama", "pull", MODEL);
logger.info(MODEL + " pulling competed!");

baseUrl = "http://" + ollamaContainer.getHost() + ":" + ollamaContainer.getMappedPort(11434);
baseUrl = ollamaContainer.getEndpoint();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are smashing the host configuration. I think would be better to allow both configurations. If the endpoint is set, then get the endpoint, but if the endpoint is not set, then leave the code as it is to allow setting by host

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @f3rnandomoreno , since this is using TestContainers under the hood, getEndPoint() will set the host. No need to explicitly set it.

Also, getEndpoint() cannot be null if container is started

@rajadilipkolli rajadilipkolli closed this by deleting the head repository May 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

Successfully merging this pull request may close these issues.

None yet

2 participants