mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
release(mistralai): 1.0.0a1 (#33232)
This commit is contained in:
@@ -7,11 +7,11 @@ import os
|
||||
import re
|
||||
import ssl
|
||||
import uuid
|
||||
from collections.abc import Callable # noqa: TC003
|
||||
from operator import itemgetter
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
Callable,
|
||||
Literal,
|
||||
Optional,
|
||||
Union,
|
||||
|
||||
@@ -202,7 +202,7 @@ class MistralAIEmbeddings(BaseModel, Embeddings):
|
||||
len(encoded) for encoded in self.tokenizer.encode_batch(texts)
|
||||
]
|
||||
|
||||
for text, text_tokens in zip(texts, text_token_lengths):
|
||||
for text, text_tokens in zip(texts, text_token_lengths, strict=False):
|
||||
if batch_tokens + text_tokens > MAX_TOKENS:
|
||||
if len(batch) > 0:
|
||||
# edge case where first batch exceeds max tokens
|
||||
|
||||
Reference in New Issue
Block a user