🐛 fix(base.py): add exception logging to improve error handling and debugging
The `logger.exception(exc)` line has been added to log the exception that occurred. This will help with error handling and debugging by providing more information about the exception that caused the error.
This commit is contained in:
parent
d39bea6e85
commit
2635f06a06
1 changed files with 1 additions and 0 deletions
|
|
@ -51,5 +51,6 @@ async def get_result_and_steps(langchain_object, message: str, **kwargs):
|
|||
)
|
||||
thought = format_actions(intermediate_steps) if intermediate_steps else ""
|
||||
except Exception as exc:
|
||||
logger.exception(exc)
|
||||
raise ValueError(f"Error: {str(exc)}") from exc
|
||||
return result, thought
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue