Skip to content

Commit

Permalink
improved function execution failure response
Browse files Browse the repository at this point in the history
- let the LLM know in a more clear way that a function execution failed.
- This is for situations where the function didn't error during execution, but it couldn't be called at all.
  • Loading branch information
brainlid committed Oct 28, 2024
1 parent b89ef86 commit 6e9f1b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/function.ex
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ defmodule LangChain.Function do
rescue
err ->
Logger.error("Function #{function.name} failed in execution. Exception: #{inspect(err)}")
{:error, inspect(err)}
{:error, "ERROR: #{inspect(err)}"}
end
end

Expand Down

0 comments on commit 6e9f1b2

Please sign in to comment.