fix: call _on_llm_error() (#13581)

Description: There's a copy-paste typo where on_llm_error() calls
_on_chain_error() instead of _on_llm_error().
Issue: #13580 
Dependencies: None
Tag maintainer: @hwchase17 
Twitter handle: @jwatte

"Run `make format`, `make lint` and `make test` to check this locally."
The test scripts don't work in a plain Ubuntu LTS 20.04 system.
It looks like the dev container pulling is stuck. Or maybe the internet
is just ornery today.

---------

Co-authored-by: jwatte <jwatte@observeinc.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
This commit is contained in:
Jon Watte
2023-12-04 19:44:50 -08:00
committed by GitHub
parent fcc8e5e839
commit e042e5df35
2 changed files with 37 additions and 1 deletions

View File

@@ -224,7 +224,7 @@ class BaseTracer(BaseCallbackHandler, ABC):
llm_run.end_time = datetime.utcnow()
llm_run.events.append({"name": "error", "time": llm_run.end_time})
self._end_trace(llm_run)
self._on_chain_error(llm_run)
self._on_llm_error(llm_run)
return llm_run
def on_chain_start(