Closed jackitaliano closed 3 months ago
Hi @jackitaliano.
Direct Connection services are used to abstract the request logic complexity so that devs wouldn't need to worry about its internals. Based on your provided details I can see that you are looking to override some of the assistant logic. There is unfortunately no easy way to provide a partial override - especially for the OpenAI assistant API as it is the most complex one. Hence, the only solution I have for you here would be to either use the handler
function to fully use your own logic or to fork/clone the project and augment the OpenAIAssistantIO class yourself. It is actually quite simple to do and the set up instructions are listed here. You can also look at the code in that class and add it to the handler
instead.
Apologies for not being able to do much more as this is unfortunately too out of bounds of our existing functionality.
Let me know if you have any questions. Thankyou!
@OvidijusParsiunas, I will look into both of those solutions. Thank you for the advice!
Scenario
directConnection
to OpenAI AssistantsMy thought for a solution
requestInterceptor
where the base64 image data is availablerequestDetails
fromrequestInterceptor
with a text description of the imagePossible alternative
onNewMessage
to edit it, similar torequestInterceptor
orresponseInterceptor
.onNewMessage
functions due to no returnMy request
requestInterceptor
, similar to how it is provided inonNewMessage
Reason
file_id
is available inrequestInterceptor
file_id
to OpenAI Vision modelfile_id
for a possible workaroundonNewMessage
isn't very useful in this scenario because unable to change message contents hereUse Cases
Example Psuedocode
Again, open to other solutions that you may have or may already exist. And again, thank you for your fast communication and fixes, it is very much appreciated.