unstructured-ingest 1.2.0__py3-none-any.whl → 1.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of unstructured-ingest might be problematic. Click here for more details.
- unstructured_ingest/__version__.py +1 -1
- unstructured_ingest/embed/interfaces.py +8 -8
- {unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/METADATA +1 -1
- {unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/RECORD +7 -7
- {unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/WHEEL +0 -0
- {unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/entry_points.txt +0 -0
- {unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.2.
|
|
1
|
+
__version__ = "1.2.1" # pragma: no cover
|
|
@@ -67,14 +67,14 @@ class BaseEmbeddingEncoder(BaseEncoder, ABC):
|
|
|
67
67
|
elements = elements.copy()
|
|
68
68
|
elements_with_text = [e for e in elements if e.get("text")]
|
|
69
69
|
texts = [e["text"] for e in elements_with_text]
|
|
70
|
-
|
|
70
|
+
all_embeddings = []
|
|
71
71
|
try:
|
|
72
72
|
for batch in batch_generator(texts, batch_size=self.config.batch_size or len(texts)):
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
embeddings_batch = self.embed_batch(client=client, batch=batch)
|
|
74
|
+
all_embeddings.extend(embeddings_batch)
|
|
75
75
|
except Exception as e:
|
|
76
76
|
raise self.wrap_error(e=e)
|
|
77
|
-
for element, embedding in zip(elements_with_text,
|
|
77
|
+
for element, embedding in zip(elements_with_text, all_embeddings, strict=True):
|
|
78
78
|
element[EMBEDDINGS_KEY] = embedding
|
|
79
79
|
return elements
|
|
80
80
|
|
|
@@ -123,14 +123,14 @@ class AsyncBaseEmbeddingEncoder(BaseEncoder, ABC):
|
|
|
123
123
|
elements = elements.copy()
|
|
124
124
|
elements_with_text = [e for e in elements if e.get("text")]
|
|
125
125
|
texts = [e["text"] for e in elements_with_text]
|
|
126
|
-
|
|
126
|
+
all_embeddings = []
|
|
127
127
|
try:
|
|
128
128
|
for batch in batch_generator(texts, batch_size=self.config.batch_size or len(texts)):
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
embeddings_batch = await self.embed_batch(client=client, batch=batch)
|
|
130
|
+
all_embeddings.extend(embeddings_batch)
|
|
131
131
|
except Exception as e:
|
|
132
132
|
raise self.wrap_error(e=e)
|
|
133
|
-
for element, embedding in zip(elements_with_text,
|
|
133
|
+
for element, embedding in zip(elements_with_text, all_embeddings, strict=True):
|
|
134
134
|
element[EMBEDDINGS_KEY] = embedding
|
|
135
135
|
return elements
|
|
136
136
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
unstructured_ingest/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
|
2
|
-
unstructured_ingest/__version__.py,sha256=
|
|
2
|
+
unstructured_ingest/__version__.py,sha256=r2tk3QlR-3IlKjbYsMIts7ynZhCAyO4v-dzzULrlUCM,42
|
|
3
3
|
unstructured_ingest/error.py,sha256=qDncnJgbf5ils956RcO2CGlAKYDT5OaEM9Clv1JVTNc,1448
|
|
4
4
|
unstructured_ingest/errors_v2.py,sha256=9RuRCi7lbDxCguDz07y5RiHoQiFIOWwOD7xqzJ2B3Yw,436
|
|
5
5
|
unstructured_ingest/logger.py,sha256=7e_7UeK6hVOd5BQ6i9NzRUAPCS_DF839Y8TjUDywraY,1428
|
|
@@ -25,7 +25,7 @@ unstructured_ingest/embed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
25
25
|
unstructured_ingest/embed/azure_openai.py,sha256=Q_buBkAcx9FBuTsAqKbRU8vd9vDh8JoDOEth4fFxHbg,2160
|
|
26
26
|
unstructured_ingest/embed/bedrock.py,sha256=dzfCsatB0i8hUp1YnXmoImoxgvUdZ4srKI6eSvn-lYM,9132
|
|
27
27
|
unstructured_ingest/embed/huggingface.py,sha256=6Gx9L3xa3cv9fX4AMuLsePJQF4T_jwkKjovfqF5X1NM,2435
|
|
28
|
-
unstructured_ingest/embed/interfaces.py,sha256=
|
|
28
|
+
unstructured_ingest/embed/interfaces.py,sha256=VCrCSJiEfIxKB4NL4AHgKb-0vB_SEekb47zMUW6gWf0,5211
|
|
29
29
|
unstructured_ingest/embed/mixedbreadai.py,sha256=uKTqzoi4M_WeYZu-qc_TSxwJONOESzxVbBLUbD1Wbns,3922
|
|
30
30
|
unstructured_ingest/embed/octoai.py,sha256=yZuD7R4mEKS4Jjyae_IrNWogMPOFFS8gW5oUllj3ROU,4540
|
|
31
31
|
unstructured_ingest/embed/openai.py,sha256=09I5BIrb-iGsv92LOV46-F7oZ7j1JnJIOQFARNKVq3k,5029
|
|
@@ -235,8 +235,8 @@ unstructured_ingest/utils/pydantic_models.py,sha256=BT_j15e4rX40wQbt8LUXbqfPhA3r
|
|
|
235
235
|
unstructured_ingest/utils/string_and_date_utils.py,sha256=oXOI6rxXq-8ncbk7EoJK0WCcTXWj75EzKl8pfQMID3U,2522
|
|
236
236
|
unstructured_ingest/utils/table.py,sha256=WZechczgVFvlodUWFcsnCGvBNh1xRm6hr0VbJTPxKAc,3669
|
|
237
237
|
unstructured_ingest/utils/tls.py,sha256=Ra8Mii1F4VqErRreg76PBI0eAqPBC009l0sSHa8FdnA,448
|
|
238
|
-
unstructured_ingest-1.2.
|
|
239
|
-
unstructured_ingest-1.2.
|
|
240
|
-
unstructured_ingest-1.2.
|
|
241
|
-
unstructured_ingest-1.2.
|
|
242
|
-
unstructured_ingest-1.2.
|
|
238
|
+
unstructured_ingest-1.2.1.dist-info/METADATA,sha256=dABn7DHmV7FLVs7oG3G_ltcDE5OSERhhZdGfJAoDtN4,8826
|
|
239
|
+
unstructured_ingest-1.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
240
|
+
unstructured_ingest-1.2.1.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
|
|
241
|
+
unstructured_ingest-1.2.1.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
|
|
242
|
+
unstructured_ingest-1.2.1.dist-info/RECORD,,
|
|
File without changes
|
{unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{unstructured_ingest-1.2.0.dist-info → unstructured_ingest-1.2.1.dist-info}/licenses/LICENSE.md
RENAMED
|
File without changes
|