Closed mdwiltfong closed 11 months ago
I have my front-end code ready to include the role
when each file is uploaded.
I see in /document/actions/create.js
the onSuccess
includes assistantId
and fileId
from the record
. Do I need to do anything on the front-end to connect the newly created assistant with these files, or will that happen in the back-end?
Here are the current UX steps:
assistantId
with each file so the back-end knows they are related?The above question is what I really need to know for the next step. I continued the process below to make sure I'm understanding what's going on:
| Do I need to do anything on the front-end to connect the newly created assistant with these files, or will that happen in the back-end?
Yeah! When creating a document, we have to tell OpenAI to "attach" this document to the AI we're creating. Look at this here.
In hindsight this might conflict with the idea that someone can only start talking to the AI after they've provided a document. Would it be possible to make it possible to upload a document at any time?
We can certainly create the assistant first and chatting is disabled in the UI until there is a resource uploaded!
Kind of like above, step 1 is creating the assitant. Step 2 is uploading the resource and template to attach to the AI we have created.
When it is all set up, then the AI can say something to start the interaction. A message like "What would you like to know?" would appear in the chat and then the chat input is enabled.
After absorbing the OpenAI docs you sent last night, I think the UX flow should instead be:
I'm going to open a new issue about the document uploading process
PDFs will be resources while Markdown files will be templates