[GH-ISSUE #2010] How to use Ollama in Google Colab? #1161

Closed
opened 2026-04-12 10:56:18 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @MonikaVijayakumar25 on GitHub (Jan 16, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2010

I have tried it via langchain but getting connection error.

ConnectionError: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/generate/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd433ce48e0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Is there any way to use Ollama in Colab?

Originally created by @MonikaVijayakumar25 on GitHub (Jan 16, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2010 I have tried it via langchain but getting connection error. ConnectionError: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/generate/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fd433ce48e0>: Failed to establish a new connection: [Errno 111] Connection refused')) Is there any way to use Ollama in Colab?
Author
Owner

@pdevine commented on GitHub (Jan 16, 2024):

cc @mxyng

<!-- gh-comment-id:1894308959 --> @pdevine commented on GitHub (Jan 16, 2024): cc @mxyng
Author
Owner

@mxyng commented on GitHub (Jan 16, 2024):

There's insufficient details in your issue to understand where the problem is. I suggest starting with this example for running Ollama in Colab: https://github.com/jmorganca/ollama/tree/main/examples/jupyter-notebook

<!-- gh-comment-id:1894362606 --> @mxyng commented on GitHub (Jan 16, 2024): There's insufficient details in your issue to understand where the problem is. I suggest starting with this example for running Ollama in Colab: https://github.com/jmorganca/ollama/tree/main/examples/jupyter-notebook
Author
Owner

@pdevine commented on GitHub (Jan 16, 2024):

Hey @MonikaVijayakumar25 please feel free to reopen the issue if you can't get it to work w/ the the tutorial that @mxyng mentioned.

<!-- gh-comment-id:1894446530 --> @pdevine commented on GitHub (Jan 16, 2024): Hey @MonikaVijayakumar25 please feel free to reopen the issue if you can't get it to work w/ the the tutorial that @mxyng mentioned.
Author
Owner

@quartermaine commented on GitHub (Feb 27, 2024):

@mxyng In the Colab notebook how to set the ngrok AUTH_TOKEN.?

<!-- gh-comment-id:1966236586 --> @quartermaine commented on GitHub (Feb 27, 2024): @mxyng In the Colab [notebook](https://github.com/jmorganca/ollama/tree/main/examples/jupyter-notebook) how to set the ngrok AUTH_TOKEN.?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1161