# Text2vec ollama embedding error

**URL:** <https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551>\
**Category:** Support\
**Created:** [May 30, 2024, 9:39am UTC](https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551 "2024-05-30T09:39:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhou\_yangbo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zhou_yangbo/32/1557_2.png) [@zhou\_yangbo](https://forum.weaviate.io/u/zhou_yangbo)\
**Post date:** [May 30, 2024, 9:39am UTC](https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551/1 "2024-05-30T09:39:34Z")

</div>

after modified the weaviate module in docker envs with text2vec-ollama then tried collection quering then errors happen as following:

vectorize params: vectorize params: vectorize params: vectorize keywords: remote client vectorize: send POST request: Post "[http://localhost:11434/api/embeddings\](http://localhost:11434/api/embeddings%5C)“: dial tcp 127.0.0.1:11434: connect: connection refused”}"  
if with local ollama embedding vectorizer working code example we will be greatly appreciated.  
any idea ?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [May 30, 2024, 11:26pm UTC](https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551/2 "2024-05-30T23:26:55Z")

</div>

Hi @zhou_yangbo !

I have just published this ollama recipe:

> <https://github.com/weaviate/recipes/blob/main/integrations/ollama/local_rag_using_ollama_integration_using_embedded.ipynb>

Note the part:

Below we use `http://localhost:11434` for calling ollama models.

As we are using **Weaviate Embedded instead of Docker** , and we assume here your ollama instalation is on the host, we should call ollama, from Weaviate, at `http://localhost:11434`

If your are **running Weaviate as a docker** container, the api\_endpoint must be `http://host.docker.internal:11434`.

---

<div class="post-metadata">

**Author:** ![zhou\_yangbo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/zhou_yangbo/32/1557_2.png) [@zhou\_yangbo](https://forum.weaviate.io/u/zhou_yangbo)\
**Post date:** [May 31, 2024, 6:48am UTC](https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551/3 "2024-05-31T06:48:07Z")

</div>

yes , and what I did is only copy pasted your codebase , then post to ollama embedding get response , then followed [Building a Local RAG System for Privacy Preservation with&nbsp;Ollama and Weaviate | Weaviate - Vector Database](https://weaviate.io/blog/local-rag-with-ollama-and-weaviate) to do near vector querying , then errors happen as following: grpc.\_channel.\_InactiveRpcError: \<\_InactiveRpcError of RPC that terminated with:  
###nearVector queried results: QueryReturn(objects=)  
###queried response: QueryReturn(objects=)  
Traceback (most recent call last):  
File “/Users/yangboz/anaconda3/envs/py311/lib/python3.11/site-packages/weaviate/collections/grpc/query.py”, line 649, in \_\_call  
res, \_ = self.\_connection.grpc\_stub.Search.with\_call(  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/Users/yangboz/anaconda3/envs/py311/lib/python3.11/site-packages/grpc/\_channel.py”, line 1198, in with\_call  
return \_end\_unary\_response\_blocking(state, call, True, None)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/Users/yangboz/anaconda3/envs/py311/lib/python3.11/site-packages/grpc/\_channel.py”, line 1006, in \_end\_unary\_response\_blocking  
raise \_InactiveRpcError(state) # pytype: disable=not-instantiable

status = StatusCode.UNKNOWN  
details = “explorer: get class: vectorize params: vectorize params: vectorize params: vectorize keywords: remote client vectorize: send POST request: Post “[http://localhost:11434/api/embeddings](http://localhost:11434/api/embeddings)”: dial tcp 127.0.0.1:11434: connect: connection refused”  
debug\_error\_string = “UNKNOWN:Error received from peer {grpc\_message:“explorer: get class: vectorize params: vectorize params: vectorize params: vectorize keywords: remote client vectorize: send POST request: Post "[http://localhost:11434/api/embeddings\](http://localhost:11434/api/embeddings%5C)”: dial tcp 127.0.0.1:11434: connect: connection refused”, grpc\_status:2, created\_time:“2024-05-31T14:41:52.814425+08:00”}"

any idea? thanks

---

<div class="post-metadata">

**Author:** ![coolrazor](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/coolrazor/32/2802_2.png) [@coolrazor](https://forum.weaviate.io/u/coolrazor)\
**Post date:** [November 5, 2024, 9:49pm UTC](https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551/4 "2024-11-05T21:49:58Z")

</div>

I just stumbled on to this after making my own post. I think I’m seeing the same issue. Ollama API is listening on /api/embed not /api/embeddings/

Check out my post for context: [Text2vec ollama embedding error - #3 by zhou\_yangbo](https://forum.weaviate.io/t/text2vec-ollama-embedding-error/2551/3)

Sadly I don’t have a fix for it yet

I made a Github issue for this: [text2vec\_ollama takes api\_endpoint but has wrong path appended · Issue #1394 · weaviate/weaviate-python-client · GitHub](https://github.com/weaviate/weaviate-python-client/issues/1394)
