-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Tool Raise Error #2421
Comments
@davorrunje have you observed a similar need? |
In general, outputting full stack traces is a security issue because it can leak internal secrets used by functions and not accessible to LLM. This is why we catch an exception and write a generic message by default. If users wish to override such behaviour, they can wrap the body of the function and write their own exception handling (outputting string formatted by exception handling code) and assume all risks associated with it. In my opinion, we should not do this automatically because we could easily leak secrets to the LLM and the LLM could easily leak further by calling other functions or executing code. |
There is some misunderstanding. Here are three points to consider:
My reasoning:
|
@WebsheetPlugin do you think a "debug mode" for function/tool executor makes sense, in which: every exception is raised and the app just dies? I tend to agree with Davor that adding the stack trace to the error message should be a conscious choice, we can certainly make it easier to do that by adding an option to show the stack trace (off by default). |
Ok guys :) You don't get me. Ofc, I agree with Davor that we should not add the stack trace to the error message. This is not the point I tried to make. Why are we adding an error message back to the stream by default? Can someone explain to me this logic? Is this normal? I think all this is done, because of some old openAi example, but if you think about this logic, it's not natural. If someone wants likes this behaviour to happen, then he should put it into try/catch himself. Got me? @ekzhu, I just read it to the end. Yes, your idea would solve it! but in my opinion, it should be the default state! |
I get you. There are two things:
I think we can have options for both of the above. |
|
Hey @ekzhu , is there any update on this? Tool debugging is very hard without this feature... |
@WebsheetPlugin we haven't updated this. For (1) above, would you like to submit a PR? |
I am a bit late to the party, but here are my two cents on the problem:
|
Consider migrating to 0.4 to address this as you can much more easily customize required behavior that you have. For allowing a tool call to be fatal I have created a new issue specifically for that #5340 You find find the migration guide for 0.2 to 0.4 here |
Is your feature request related to a problem? Please describe.
A) Is there a possibility of raising the error I get from calling a tool? Curently it's writing only back the text, without the stack trace
This would allow me to faster develop the app.
B) Another way of solving the problem would be to log the stack trace.
Describe the solution you'd like
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: