Skip to content
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

new: chat with file - backend side #1703

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nquang29
Copy link
Collaborator

No description provided.

@nquang29 nquang29 changed the title new: chat with file new: chat with file - backend side Jan 16, 2025
@beastoin
Copy link
Collaborator

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

@nquang29

@nquang29
Copy link
Collaborator Author

1/ with the same thread and request body contain file_id that user want to ask, they can ask follow up question @beastoin
e.g. i asked about an image
Screenshot 2025-01-19 at 10 41 24

@mdmohsin7
Copy link
Collaborator

mdmohsin7 commented Jan 23, 2025

@nquang29 can you pls return the links for the thumbnails in /v2/messages if the message contains any? Not just the file ids, the thumbnails as well if they are images. I'll have to show them in the app like the screenshot below
Screenshot 2025-01-23 at 8 18 38 PM

@nquang29
Copy link
Collaborator Author

@mdmohsin7 it's done, pls help me check it

@mdmohsin7
Copy link
Collaborator

Hi @nquang29, the GET /v2/messages endpoint does not seem to return the files objects. It returns the file ids but not the files. See the below output from that endpoint call for reference. It has the file id but not the file

Screenshot 2025-01-24 at 9 58 18 PM

@beastoin
Copy link
Collaborator

#1617

@nquang29
Copy link
Collaborator Author

Hi @mdmohsin7, Sorry for not noting the APIs clearly, I think we have had a misunderstanding:
after call api post /files, we received response below, we have :

  • id : id of file use for omi's system
  • openai_file_id: id of file we got from openai
    We should use id for api send messages
Screenshot 2025-01-25 at 12 07 33

and this is files object in the output:
Screenshot 2025-01-25 at 12 13 39

@mdmohsin7
Copy link
Collaborator

Thanks for the clarification @nquang29. Everything works perfectly, checkout the video in #1629 😄

@beastoin review time 🌚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants