Replies: 4 comments 1 reply
-
Nice to hear your feedback on how you use this library. I am not sure that number of parameters for SORTBY is correct. From your post is clear what is not working, but I do not understand what you want to achieve. Can you explain what you want to do and why do you believe that current program should work. Kind regards, Luka. |
Beta Was this translation helpful? Give feedback.
-
The project is an extended learning exercise. Exploring ways to extend the usefulness of OpenAI APIs for chat conversations that contain a large amount of information. Redis (and RediSearch) support Vector Similarity search which will allow the search to determine the relevant information to pass to the OpenAI API.
The process is:
Receive a user request
Retrieve an embedding for the request - embedding is an array of doubles
Store the embedding and other meta-data in redis
Request a response from OpenAI for the request
Retrieve an embedding for the response
Store the embedding and other meta-data in redis
Return to step 1
At some point the request sent to OpenAI in step 4 will approach the limit of the API - token limit. At this point, between step 2 and step 3, I need to perform a VSS (Vector Similarity Search) via redis and redisearch to identify the relevant parts of the conversation and use those parts to construct the next request.
Can you check that you have correct number of elements and that the attribute that you want to sort over exists.
Using RedisInsight-v2: I believe the data is there. I do not understand your question regarding the correct number of elements.
The data in the field labeled ‘embedding’ in the image below, is ~20 KB. Does this cause any concern for the redis package?

--EDIT - sorry for the image reference. forgot it will not show here.
Thank you for looking into my questions.
… On May 27, 2023, at 2:23 PM, Luka Rahne ***@***.***> wrote:
Nice to hear your feedback on how you use this library.
I am not sure that number of parameters for SORTBY is correct.
From https://redis.io/commands/ft.search/
Can you check that you have correct number of elements and that the attribute that you want to sort over exists.
From your post is clear what is not working, but I do not understand what you want to achieve. Can you explain what you want to do and why do you believe that current program should work.
Kind regards, Luka.
—
Reply to this email directly, view it on GitHub <#76 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6S42VX2CFGISFDOTRJDV3XIJIC7ANCNFSM6AAAAAAYRKXDPE>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
After looking into more current documentation for FT.SEARCH, i have removed the '1' following 'SORTBY'. The previous error has been replaced with a very cryptic: |
Beta Was this translation helpful? Give feedback.
-
thank you. |
Beta Was this translation helpful? Give feedback.
-
I have constructed commands like 'FT.INFO', 'FT.CREATE' and 'FT.ADD' using the 'send_object()' method. These all work correctly as far as I can tell. The right stuff gets added to the right index.
The problem comes when I attempt a search: I have not been able to construct a working 'FT.SEARCH' command. They all fail with a redis error.
This code correctly creates the index:
This code correctly adds docs to the index:
Using RedisInsight-v2, I can see that the 'FT.ADD' added the correct data.
But this code always fails with a redis error:
I have tried many variations on this command and they all fail with the same error.
)RedisError(Unknown argument
SCORE
at position 6 forAny help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions