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 503 when Private GPT calls Ollama API on startup (Docker Compose ollama-api profile) #2104

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

meng-hui
Copy link
Contributor

Fix for #2066

Description

When running private gpt with external ollama API, ollama service returns 503 on startup because ollama service (traefik) might not be ready.

  • Add healthcheck to ollama service to test for connection to external ollama
  • private-gpt-ollama service depends on ollama being service_healthy

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • I stared at the code and made sure it makes sense
  • I ran the docker compose ollama-api profile

I did not test the other profiles.

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Not relevant

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I ran make check; make test to ensure mypy and tests pass

I made a configuration change.

When running private gpt with external ollama API, ollama service
returns 503 on startup because ollama service (traefik) might not be
ready.

- Add healthcheck to ollama service to test for connection to external
ollama
- private-gpt-ollama service depends on ollama being service_healthy
Copy link
Collaborator

@jaluma jaluma left a comment

Choose a reason for hiding this comment

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

LGTM!

Thank you

@jaluma jaluma merged commit 940bdd4 into zylon-ai:main Oct 17, 2024
6 checks passed
zhygallo added a commit to zhygallo/private-gpt that referenced this pull request Oct 17, 2024
fix: 503 when private gpt gets ollama service (zylon-ai#2104)
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.

2 participants