mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 13:54:48 +00:00
[MistralAI] Improve MistralAIEmbeddings (#29242)
- Add static method decorator for method. - Add expected exception for retry decorator #29125
This commit is contained in:
parent
22aa5e07ed
commit
ac53977dbc
@ -224,7 +224,9 @@ class MistralAIEmbeddings(BaseModel, Embeddings):
|
|||||||
batch_responses = []
|
batch_responses = []
|
||||||
|
|
||||||
@retry(
|
@retry(
|
||||||
retry=retry_if_exception_type(httpx.TimeoutException),
|
retry=retry_if_exception_type(
|
||||||
|
(httpx.TimeoutException, httpx.HTTPStatusError)
|
||||||
|
),
|
||||||
wait=wait_fixed(self.wait_time),
|
wait=wait_fixed(self.wait_time),
|
||||||
stop=stop_after_attempt(self.max_retries),
|
stop=stop_after_attempt(self.max_retries),
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user