new: chat with file - backend side#1703
Conversation
2115bb1 to
9756686
Compare
9756686 to
f2f80e4
Compare
|
1/ so, the user can not ask the follow up question on the previous files. right ? i see the condition that check the last message only |
|
1/ with the same thread and request body contain file_id that user want to ask, they can ask follow up question @beastoin |
|
@nquang29 can you pls return the links for the thumbnails in |
|
@mdmohsin7 it's done, pls help me check it |
|
Hi @nquang29, the
|
|
Hi @mdmohsin7, Sorry for not noting the APIs clearly, I think we have had a misunderstanding:
|
|
1/ i understand that if the app includes you know that the chat system can determine a user's memories by extracting topics, time from the question, which is parsed by the last 10 messages. from that we can help LLM understand about the current context for a better answer. how does the chat-with-file work in term of context? |
|
1/ you cannot ask the 2nd question with plain text message. When the first message includes attached files, the following messages have to attached files to be able to chat with files until the chat is clear - end thread of chat-with-files |
|
1/ did the app handle that logic, right ? > the following messages have to attached files |
|
hi @mdmohsin7 , regarding logic thread - end thread: |
|
Hi @nquang29, the way currently it is implemented:
Pls let me know if any changes are required in this |
|
Flow in BE that I implemented:
so these messages need include file_ids until the chat is cleared @mdmohsin7 |
|
1/ The app doesn't handle this logic yet. I’ve just discussed with @mdmohsin7 about this case, and I've asked him to add it @beastoin |
|
Got it, @nquang29. I can include the file IDs in subsequent messages. However, it seemed to work fine even without them, as the chat was still responding to content related to the file to some extent when I was testing it. Also, could you please add an indicator or a field to specify which message first included the file? Otherwise, it would be difficult for me to determine which messages should display the file thumbnails, as I rely on the |
|
I have a situation: |
|
2/ have you use the chat session or the similar term yet?, e.g. chat_session{type, file_ids, } . for example #1758 |
I think if the backend only returns the files when the user has actually attached them to that message, it will cover all cases. You can return the file IDs for all related messages, but return the actual file objects only for the messages to which they were attached. The file IDs will help identify which files the messages are related to, while the file objects will only be used to display the files. What do you think? @nquang29 |
|
@mdmohsin7 i made some changes: |
|
2/ No, sir. Is it necessary to use a session in this case? I'm not sure what its purpose would be in the context you're asking about. @beastoin |
|
Hi @nquang29 yes it works |
|
1/ The app has handled the logic of adding file_id to the subsequent messages @beastoin |
|
1/ ✅ |
|
2/ I have already implemented a chat session:
3/ I use this code to determine whether a message is related to a chat with a file or not. I have updated this logic to recognize file-related questions using a prompt. 4/ Based on /3, the system can identify whether a question related to a file or not, so users can ask about their memory as well. |
|
2/ ✅ |
|
3/ i just changed the logic for getting the newly attached file to prioritize retrieving it from the session 4/ that's right. I haven't quite figured out the connection between chat-with-file and the users memories or facts. Could you help me understand it clearly? 5/ the app will need to include chat session in case there is a list of chat session history similar to ChatGPT. In that case, the app needs to request a specific chat session id to distinguish and manage sessions or continue chatting in this session |
|
3/ chat session must have a plugin_id (or app_id) field to determine if the user is chatting with omi or another app (e.g. Naval). e.g. i can have 10 sessions with omi but 3 sessions with Naval, the last session chatting with Omi is not the same with the last session chatting with Naval. the last commit pls sir, then drop the demo video + deploy plan. |
|
3/ i have updated it. thanks for the explanation, i now have a better understanding of the plugin on the app. |
|
hi @mdmohsin7 |
|
When I change from an app back to omi, I get this error. WIll have to create an index in firestore Edit: I've created this index in dev env |
|
@mdmohsin7 yes, pls help me to create index on your local env firebase |
|
resolve conflicts pls sir @nquang29 |
4aafd6e to
ae1199c
Compare
|
Deploy plan: 2/ create bucket in gg cloud storage with name in 1/ 3/ create index in firestore db:
4/ deploy BE service |
|
resolved conflict sir @beastoin |
|
lgtm, congratulation @nquang29 🚀 |
|
hi @nquang29, man, regrading to the first step of the deploy plans, do we really need to make the bucket public ?
|
|
No need, sir @beastoin . It still works for not-public. This is the test environment, right? I am not the one who created it in the test environment. |
|
deploy plan drop #1617 (comment) |






No description provided.