Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3588

Ollama Embeddings call fails with wrong URL path: /api/embeddings

$
0
0

Oh actually I forgot to not use the server hostname since it appears the call is made from within the Weaviate container, not the script (if I’m not mistaken).

I just edit these lines to use my DNS trick:
api_endpoint="http://host.docker.internal:11434",

but now the error I get is different. Although still not working. I tried setting the timeouts to 600 and it still does it.

ERROR:

python test.py
Client: 4.9.3, Server: 1.27.1
1024
Traceback (most recent call last):
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/collections/grpc/query.py", line 804, in __call
    res = await _Retry(4).with_exponential_backoff(
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/collections/grpc/retry.py", line 31, in with_exponential_backoff
    raise e
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/collections/grpc/retry.py", line 28, in with_exponential_backoff
    return await f(*args, **kwargs)
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/grpc/aio/_call.py", line 327, in __await__
    raise _create_rpc_error(
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "explorer: list class: extend: extend generate: client not found, empty provider"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"explorer: list class: extend: extend generate: client not found, empty provider", grpc_status:2, created_time:"2024-11-06T06:39:04.574035292-08:00"}"
>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/razor/repos/assistant/test.py", line 43, in <module>
    print(collection.generate.fetch_objects(single_prompt="answer: {text}").objects[0].generated)
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/syncify.py", line 23, in sync_method
    return _EventLoopSingleton.get_instance().run_until_complete(
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/event_loop.py", line 42, in run_until_complete
    return fut.result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/collections/queries/fetch_objects/generate.py", line 75, in fetch_objects
    res = await self._query.get(
  File "/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/collections/grpc/query.py", line 814, in __call
    raise WeaviateQueryError(str(e), "GRPC search")  # pyright: ignore
weaviate.exceptions.WeaviateQueryError: Query call with protocol GRPC search failed with message <AioRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "explorer: list class: extend: extend generate: client not found, empty provider"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"explorer: list class: extend: extend generate: client not found, empty provider", grpc_status:2, created_time:"2024-11-06T06:39:04.574035292-08:00"}"
>.
/home/razor/repos/assistant/.venvrag/lib/python3.10/site-packages/weaviate/warnings.py:329: ResourceWarning: Con004: The connection to Weaviate was not closed properly. This can lead to memory leaks.
            Please make sure to close the connection using `client.close()`.
/usr/lib/python3.10/asyncio/selector_events.py:710: ResourceWarning: unclosed transport <_SelectorSocketTransport fd=6 read=idle write=<idle, bufsize=0>>

Viewing all articles
Browse latest Browse all 3588

Trending Articles