-
Notifications
You must be signed in to change notification settings - Fork 37
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
REDBOX 337 chat file selection #556
Conversation
…e through the chat view.
core_api/src/routes/chat.py
Outdated
search_kwargs = {"filter": {"term": {"creator_user_uuid.keyword": str(user_uuid)}}} | ||
search_kwargs = {"filter": {"bool": {"must": [{"term": {"creator_user_uuid.keyword": str(user_uuid)}}]}}} | ||
|
||
if chat_request.selected_files is not None: |
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.
if chat_request.selected_files is not None: | |
if chat_request.selected_files: |
selected_files
should never be None
- the model uses a default factory.
@@ -15,6 +15,10 @@ class FileResource(admin.ModelAdmin): | |||
list_display = ["original_file_name", "user", "status"] | |||
|
|||
|
|||
class ChatMessageResource(admin.ModelAdmin): | |||
list_display = ["chat_history", "text", "role"] |
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.
list_display = ["chat_history", "text", "role"] | |
list_display = ["chat_history", "text", "role", "created_at"] |
search_kwargs["filter"]["bool"]["should"] = [ | ||
if chat_request.selected_files: | ||
logging.info("chat_request.selected_files: %s", str(chat_request.selected_files)) | ||
search_kwargs["filter"]["bool"]["must"] = [ |
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.
shoot me
Context
See https://technologyprogramme.atlassian.net/browse/REDBOX-337
This PR adds file_uuid param to core-api RAG endpoints, and update django to use them
Changes proposed in this pull request
Guidance to review
Relevant links
Things to check