Docker + Ollama installation found chunks but give no answer

Description

Hey,I’m new to Verba and I’m using Ollama and Docker.

I followed the GitHub tutorial and successfully updated the .env file using Verba’s web interface.

I also uploaded a PDF document to Verba without any issues.However, when I try to ask Verba a question, it identifies the relevant chunks in the document and starts to generate an answer. But after a while, it stops without providing any answer or error message.

For reference, Ollama works well when I use it in the command line, I’m using the phi3 model and i didn’t touch the docker-compose.yml

Server Setup Information

  • Weaviate Server Version: 3.4 latest (today 30/05/2024)
  • Deployment Method: docker
  • Multi Node? Number of Running Nodes: 1
  • Client Language and Version: latest (today 30/05/2024)
  • Multitenancy?: /

Any additional Information

my .env file :

OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=phi3
OLLAMA_EMBED_MODEL=nomic-embed-text

Logs :

verba-1 | Traceback (most recent call last):
verba-1 | File “/Verba/goldenverba/server/api.py”, line 179, in websocket_generate_stream
verba-1 | async for chunk in manager.generate_stream_answer(
verba-1 | File “/Verba/goldenverba/verba_manager.py”, line 667, in generate_stream_answer
verba-1 | async for result in self.generator_manager.generators[
verba-1 | File “/Verba/goldenverba/components/generation/OllamaGenerator.py”, line 48, in generate_stream
verba-1 | async with session.post(url, json=data) as response:
verba-1 | File “/usr/local/lib/python3.11/site-packages/aiohttp/client.py”, line 1197, in aenter
verba-1 | self._resp = await self._coro
verba-1 | ^^^^^^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/site-packages/aiohttp/client.py”, line 608, in _request
verba-1 | await resp.start(conn)
verba-1 | File “/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py”, line 971, in start
verba-1 | with self._timer:
verba-1 | File “/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py”, line 735, in exit
verba-1 | raise asyncio.TimeoutError from None
verba-1 | TimeoutError
verba-1 |
verba-1 | During handling of the above exception, another exception occurred:
verba-1 |
verba-1 | Traceback (most recent call last):
verba-1 | File “/usr/local/lib/python3.11/site-packages/uvicorn/protocols/websockets/websockets_impl.py”, line 240, in run_asgi
verba-1 | result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
verba-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py”, line 69, in call
verba-1 | return await self.app(scope, receive, send)
verba-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/site-packages/fastapi/applications.py”, line 292, in call
verba-1 | await super().call(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/applications.py”,
line 122, in call
verba-1 | await self.middleware_stack(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py”, line 149, in call
verba-1 | await self.app(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/middleware/cors.py”, line 75, in call
verba-1 | await self.app(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py”, line 79, in call
verba-1 | raise exc
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py”, line 68, in call
verba-1 | await self.app(scope, receive, sender)
verba-1 | File “/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py”, line 20, in call
verba-1 | raise e
verba-1 | File “/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py”, line 17, in call
verba-1 | await self.app(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/routing.py”, line
718, in call
verba-1 | await route.handle(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/routing.py”, line
341, in handle
verba-1 | await self.app(scope, receive, send)
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/routing.py”, line
82, in app
verba-1 | await func(session)
verba-1 | File “/usr/local/lib/python3.11/site-packages/fastapi/routing.py”, line 324, in app
verba-1 | await dependant.call(**values)
verba-1 | File “/Verba/goldenverba/server/api.py”, line 193, in websocket_generate_stream
verba-1 | await websocket.send_json(
verba-1 | File “/usr/local/lib/python3.11/site-packages/starlette/websockets.py”, line 171, in send_json
verba-1 | text = json.dumps(data, separators=(“,”, “:”))
verba-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/json/init.py”, line 238, in dumps
verba-1 | **kw).encode(obj)
verba-1 | ^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/json/encoder.py”, line 200, in encode
verba-1 | chunks = self.iterencode(o, _one_shot=True)
verba-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/json/encoder.py”, line 258, in iterencode
verba-1 | return _iterencode(o, 0)
verba-1 | ^^^^^^^^^^^^^^^^^
verba-1 | File “/usr/local/lib/python3.11/json/encoder.py”, line 180, in default
verba-1 | raise TypeError(f’Object of type {o.class.name} ’
verba-1 | TypeError: Object of type TimeoutError is not JSON serializable
verba-1 | INFO: connection closed
verba-1 | ✘ WebSocket Error:

Hi Luc!

I believe this is more a Verba issue, so it’s better to open an issue on it’s repo.

I have been playing more with Verba recently. I have limited connection today, but will try to reproduce this soon.

Does this happen only with this specific model or any Ollama models?

Yes, I sent my .env file. I am resending it below.

.env:
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=phi3
OLLAMA_EMBED_MODEL=nomic-embed-text

I searched through the issues on GitHub and found this one:

ollama; WebSocket timeout not configurable and after a timeout subsequent requests fail · Issue #201 · weaviate/Verba · GitHub

It looks like it’s the same issue as mine.

Hello,

I apologize if this seems intrusive, but could you please provide an estimate on when you might be able to address this ticket:
ollama; WebSocket timeout not configurable and after a timeout subsequent requests fail · Issue #201 · weaviate/Verba · GitHub?

Since I have made only minor modifications, it is possible that the issue might be related to my changes. In that case, I understand it would be best to remain on the forum for assistance.

Thank you in advance.

Hi! Not really.

Our team will take a look on it eventually.

However, no ETA for that.

Sorry :grimacing: