Comments (6)
Hi @adamakhtar this kind of error:
ValueError: operands could not be broadcast together with shapes (747,) (746,)
Happens when the embeddings have different size than expected.
Can you repeat the error with a clean installation?
Another option is file based Qdrant messing up when uploading multiple documents at once. Solutions:
- use Qdrant container (example in repo
local-cat
) - upload one document per time
Let me know ;)
from core.
EDIT: My issue was related to a bug in C.A.T. Advanced Tools plugin, issue here
I do not have time now to debug, I'll leave here a note
I have a similar issue running local-cat, I receive "'>=' not supported between instances of 'UnexpectedResponse' and 'int'".
My experience was:
- upload a single document and wait for uploading to complete (with the summarization plugin turned on)
- chat and check that everything is ok
- download and activate a new plugin
at this point, I see the error.
Here some logs
cheshire_cat_core | [2024-03-14 17:25:09.286] INFO cat.looking_glass.stray_cat.StrayCat.recall_relevant_memories_to_working_memory::121
cheshire_cat_core | "Recall query: 'ooo'"
cheshire_cat_vector_memory | 2024-03-14T17:25:10.437872Z INFO actix_web::middleware::logger: 192.168.0.4 "POST /collections/episodic/points/search HTTP/1.1" 200 68 "-" "python-httpx/0.27.0" 0.002927
cheshire_cat_vector_memory | 2024-03-14T17:25:10.441132Z INFO actix_web::middleware::logger: 192.168.0.4 "POST /collections/declarative/points/search HTTP/1.1" 200 69 "-" "python-httpx/0.27.0" 0.000905
cheshire_cat_vector_memory | 2024-03-14T17:25:10.443311Z INFO actix_web::middleware::logger: 192.168.0.4 "POST /collections/procedural/points/search HTTP/1.1" 422 131 "-" "python-httpx/0.27.0" 0.000355
cheshire_cat_core | [2024-03-14 17:25:10.444] ERROR cat.looking_glass.stray_cat.StrayCat.__call__::250
cheshire_cat_core | UnexpectedResponse()
cheshire_cat_core | [2024-03-14 17:25:10.467] ERROR cat.routes.websocket..websocket_endpoint::82
cheshire_cat_core | TypeError("'>=' not supported between instances of 'UnexpectedResponse' and 'int'")
cheshire_cat_core | Traceback (most recent call last):
cheshire_cat_core | File "/app/cat/looking_glass/stray_cat.py", line 248, in __call__
cheshire_cat_core | self.recall_relevant_memories_to_working_memory()
cheshire_cat_core | File "/app/cat/looking_glass/stray_cat.py", line 170, in recall_relevant_memories_to_working_memory
cheshire_cat_core | memories = vector_memory.recall_memories_from_embedding(**config)
cheshire_cat_core | File "/app/cat/memory/vector_memory_collection.py", line 231, in recall_memories_from_embedding
cheshire_cat_core | memories = self.client.search(
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/qdrant_client/qdrant_client.py", line 343, in search
cheshire_cat_core | return self._client.search(
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/qdrant_client/qdrant_remote.py", line 479, in search
cheshire_cat_core | search_result = self.http.points_api.search_points(
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api/points_api.py", line 1388, in search_points
cheshire_cat_core | return self._build_for_search_points(
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api/points_api.py", line 636, in _build_for_search_points
cheshire_cat_core | return self.api_client.request(
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 74, in request
cheshire_cat_core | return self.send(request, type_)
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 97, in send
cheshire_cat_core | raise UnexpectedResponse.for_response(response)
cheshire_cat_core | qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 422 (Unprocessable Entity)
cheshire_cat_core | Raw response content:
cheshire_cat_core | b'{"status":{"error":"Validation error in JSON body: [search_request.limit: value 0 invalid, must be 1.0 or larger]"},"time":0.0}'
cheshire_cat_core |
cheshire_cat_core | During handling of the above exception, another exception occurred:
cheshire_cat_core |
cheshire_cat_core | Traceback (most recent call last):
cheshire_cat_core | File "/app/cat/routes/websocket.py", line 73, in websocket_endpoint
cheshire_cat_core | await asyncio.gather(
cheshire_cat_core | File "/app/cat/routes/websocket.py", line 24, in receive_message
cheshire_cat_core | cat_message = await run_in_threadpool(stray.run, user_message)
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
cheshire_cat_core | return await anyio.to_thread.run_sync(func, *args)
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
cheshire_cat_core | return await get_asynclib().run_sync_in_worker_thread(
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
cheshire_cat_core | return await future
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
cheshire_cat_core | result = context.run(func, *args)
cheshire_cat_core | File "/app/cat/looking_glass/stray_cat.py", line 340, in run
cheshire_cat_core | return self.loop.run_until_complete(
cheshire_cat_core | File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
cheshire_cat_core | File "/app/cat/looking_glass/stray_cat.py", line 251, in __call__
cheshire_cat_core | traceback.print_exc(e)
cheshire_cat_core | File "/usr/local/lib/python3.10/traceback.py", line 179, in print_exc
cheshire_cat_core | print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)
cheshire_cat_core | File "/usr/local/lib/python3.10/traceback.py", line 119, in print_exception
cheshire_cat_core | te = TracebackException(type(value), value, tb, limit=limit, compact=True)
cheshire_cat_core | File "/usr/local/lib/python3.10/site-packages/exceptiongroup/_formatting.py", line 96, in __init__
cheshire_cat_core | self.stack = traceback.StackSummary.extract(
cheshire_cat_core | File "/usr/local/lib/python3.10/traceback.py", line 357, in extract
cheshire_cat_core | if limit >= 0:
cheshire_cat_core | TypeError: '>=' not supported between instances of 'UnexpectedResponse' and 'int'
cheshire_cat_core | INFO: connection closed
from core.
@pieroit thank you for the information. I've currently put on hold the project which required uisng Cheshire Cat so won't be able ot try your suggestions.
However, in case this helps anybody else, I think I did see some errors regarding embeddings and different sizes in my terminal when uploading the texts so that was likely the issue as you mentioned.
from core.
Related Issues (20)
- [BUG] Something went wrong while connecting to the server (https) HOT 3
- [Feature] Add API Key on Openai Compatible API HOT 2
- Rabbithole endpoint to ingest a single text chunk
- [Feature] Support Recursive URL in the RabbitHole HOT 2
- Manage plugin upgrade HOT 8
- [Feature] Add hooks used in "why" response
- [BUG] UNSUPPORTED MEDIA TYPE for EmbedderOpenAICompatibleConfig HOT 3
- The cat is ignoring me HOT 11
- ENV variable for Qdrant endpoint doesn't seem to work HOT 11
- [Feature] add a new hook before that the document is parsed HOT 6
- Allow all endpoints to have or not final slash `/`
- [BUG] "Completions.create() got an unexpected keyword argument 'repeat_penalty'" (related to openai-python v1?) HOT 6
- [Feature]Docstring in the tools more clear HOT 2
- 1.4.5/1.5.1 problems using Azure OAI HOT 32
- Refactoring Azure integration HOT 1
- Error executing Chesire Cat with local llm and qdrant HOT 3
- [BUG] - core v1.5.1 traceback when connecting to remote qdrant of version v1.8.x HOT 2
- [BUG] upload memories HOT 1
- [Feature]Could the chat API support the OpenAI Chat Completion API standard to be compatible with a chat web app? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.