mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-09 04:50:37 +00:00
Rm pytz dep (#6978)
This commit is contained in:
parent
eb180e321f
commit
1ce9ef3828
@ -9,7 +9,6 @@ from time import time
|
||||
from typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, Optional, Union
|
||||
|
||||
import numpy as np
|
||||
import pytz
|
||||
|
||||
from langchain.callbacks.base import BaseCallbackHandler
|
||||
from langchain.schema import AgentAction, AgentFinish, LLMResult
|
||||
@ -162,6 +161,12 @@ class ArthurCallbackHandler(BaseCallbackHandler):
|
||||
|
||||
def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None:
|
||||
"""On LLM end, send data to Arthur."""
|
||||
try:
|
||||
import pytz # type: ignore[import]
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"Could not import pytz. Please install it with 'pip install pytz'."
|
||||
) from e
|
||||
|
||||
run_id = kwargs["run_id"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user