mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Server error '502 Bad Gateway' for url 'http://127.0.0.1:11434/api/chat' #3
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RussellXY on GitHub (Jan 18, 2024).
I'm sure the ollama service is running with this command:
ollama serve. but I still got this when run the sample code:@mxyng commented on GitHub (Jan 18, 2024):
Where is your ollama service running? If it's not locally on port 11434, you'll need to change it by setting the
OLLAMA_HOSTenvironment variable or creating a custom clientollama.Client(base_url='...').chat(...)@RussellXY commented on GitHub (Jan 18, 2024):
I'm sorry, it's my fault. I'm using a VPN for all network requests on my computer, that's the reason for the 502 bad gateway thank you for your reply🙏