jimvh
jimvh4mo ago

Chat with your database - Assistant V2 - 'V' : 'Output too large'

I'm using the OpenAI assistant node like in the 'chat with your database' template where it queries a menu dataset. In my case the dataset is a restapi call. It kind of works. However, when I feed it too many rows it will just return 'input too large - output too large' in the logs and it will generate a random response for the assistant. I'm testing with 'how many rows are there in my dataset'.. When it is able to work through all data it will say like for example 50 which is correct. But when the set has like 100 rows it logs 'output too large' and will return that it contains for example 173 rows. So it's just making up a number. Is there a way to pull in the info from the rest api call, save it in storage as like a csv and feed it as an attachment to the assistant? Not sure since I haven't played around with it that much yet but might this be possible?
Solution:
For the second question to save the data from REST API request and sue it as feed to Assistant, you can create a workflow like this to achieve the usecase.
Jump to solution
3 Replies
Gaurav Chadha
Gaurav Chadha4mo ago
Hi @jimvh, The response from the logs - input&output is too large and is not an error or issue, we are excluding very large JSON responses in the logs system currently and displaying the above message, it should work correctly if you connect it with your client (frontend) and send the response. We'll update the verbiage to display a better info message and will improve the UX around this.
Solution
Gaurav Chadha
Gaurav Chadha4mo ago
For the second question to save the data from REST API request and sue it as feed to Assistant, you can create a workflow like this to achieve the usecase.
jimvh
jimvh4mo ago
Thanks for your feedback. I will check it out as soon as possible and see if it works. Fun fact I noticed when testing sending json data to the assistants: when asking gpt4-turbo how many rows there are like in a json file with only 20 rows it will say things like 50 or 22 instead of 20. When asking Gpt4-o the same question it will return the correct anwer all the time. I do notice when I pass a dataset to the assistant that as long as I pass a number lower than 10 it get's it right. When I pass a number of rows higher than 10 it always returns 1 number lower. Say I send it 20 lines it will say it counts 19. When I send it 36 lines it will say it counts 35. When I send it 10 lines it will say 10 and when I pass it 8 lines it will say 8. Not sure what is wrong because the data that I collect is indeed 20 or 36 and not 19 or 35 objects. And when my data set is too big it makes up a number.