Rm pytz dep (#6978)

pull/6985/head
Bagatur 1 year ago committed by GitHub
parent eb180e321f
commit 1ce9ef3828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,6 @@ from time import time
from typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, Optional, Union from typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, Optional, Union
import numpy as np import numpy as np
import pytz
from langchain.callbacks.base import BaseCallbackHandler from langchain.callbacks.base import BaseCallbackHandler
from langchain.schema import AgentAction, AgentFinish, LLMResult from langchain.schema import AgentAction, AgentFinish, LLMResult
@ -162,6 +161,12 @@ class ArthurCallbackHandler(BaseCallbackHandler):
def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None: def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None:
"""On LLM end, send data to Arthur.""" """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"] run_id = kwargs["run_id"]

Loading…
Cancel
Save