-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added doc indexing, moved processing to ray actors #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really amazing work! I left some specific feedback inline, but overall the design is really solid. It is great to see how we can use ray like this to build a more robust, distributed backend for usage cases like this. Super cool!
if(message.body.startswith("/")): | ||
command = message.body.split(' ', 1)[0] | ||
if command in COMMANDS.keys(): | ||
actor = ray.get_actor(COMMANDS[command].value) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
index_actor = ray.get_actor(ACTOR_TYPE.READ.value) | ||
handle = index_actor.get_index.remote() | ||
vectorstore = ray.get(handle) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Summary
This PR moves the chat prediction code to distributed tasks using ray actors, this will allow non-blocking processing of chat requests. To process the replies, a
ReplyProcessor
has been added that that will distribute the replies from the chat provider. This PR also includes the ability to load the specified directories into a FAISS index, which can be used to ask questions pertaining to the loaded documents. Users can type/index <dir-name>
in the chat to start loading the directories. They can then use the/fs <question>
or/filesystem <question>
to ask a question, which will switch to a RAG chain to get relevant context from the indexed documents.Demo
Tasks
/read <dir-name>
/fs <query>