app Notes
input
When I tried to ask for weather for next five days that return was so big that it was over 8000 tokens that it was saved to file,
but the program went into a endless loop to read the the first 100 line of the file, but since the file is only one line more than 8000 tok were returned and the tool mentioned that it was too big and saved to a file
so it went into a endless loop trying to read and read the file over and over again
Add Exception, that when a read file command would return more than 8000 tokens simply return the first 6000 tokens and explain that the file was truncated and that we can use option to read larger files up to 32K tokens. (add this option.)
We do not want to read file function to check for two large token and just mention that it’s a back to file like other one this one should be treated as exception
Also We should not allow calling exactly the same tool with exactly same parameters twice in a row. This probably means that there is an issue. Simply stop and ask the user if you want to continue.. you can simply update the assistant skill for that.
We should also have a hard limit of 25 tool call in a row in the python code before stopping and asking. the user will simply ask to continue after that if he wants to
A User message would reset that count
This count check could go near the tool response llm call.