mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
NotImplementedError thrown when embedding a document using vertex AI's text-multilingual-embedding-002 model #519
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Armando200108 on GitHub (Aug 5, 2025).
Self Checks
Dify version
1.7.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Submit a txt file in the file upload section of the knowledge base, select the embedding model named “text-multilingual-embedding-002”, and the rerank model named “amazon.rerank-v1:0”. After submitting, observe the log to find the result
log details:
✔️ Expected Behavior
Text can be embedded normally
❌ Actual Behavior
Error reported, message: [vertex_ai] Error: PluginInvokeError: {“args”:{}, ‘error_type’: " NotImplementedError“, ‘message’:”"}
@Armando200108 commented on GitHub (Aug 5, 2025):
Meanwhile, when I use an extremely simple workflow directly (start -> gemini 2.5 pro -> outout) and type Hello World, it outputs the following error:
@Meshinfo commented on GitHub (Aug 5, 2025):
+1 ,the same error when trying to use vertex embedding models in KB
@Armando200108 commented on GitHub (Aug 5, 2025):
Apologies to all, after checking with other departments, it has been confirmed that Google Service Account was disabled by this department in the early hours of this morning, which led to this issue, and the issue will not happen after restoring the account.
@Meshinfo commented on GitHub (Aug 5, 2025):
This is not my case, i am sure the vertx ai api works fine,but still get the error message of :
Traceback (most recent call last):
File "/app/api/core/indexing_runner.py", line 80, in run
self._load(
File "/app/api/core/indexing_runner.py", line 575, in _load
tokens += future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/indexing_runner.py", line 630, in _process_chunk
index_processor.load(dataset, chunk_documents, with_keywords=False)
File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 78, in load
vector.create(documents)
File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 188, in create
batch_embeddings = self._embeddings.embed_documents([document.page_content for document in batch])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/rag/embedding/cached_embedding.py", line 99, in embed_documents
raise ex
File "/app/api/core/rag/embedding/cached_embedding.py", line 61, in embed_documents
embedding_result = self._model_instance.invoke_text_embedding(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_manager.py", line 221, in invoke_text_embedding
self._round_robin_invoke(
File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 53, in invoke
raise self._transform_invoke_error(e)
core.model_runtime.errors.invoke.InvokeError: [vertex_ai] Error: PluginInvokeError: {"args":{},"error_type":"NotImplementedError","message":""}
2025-08-05 10:25:21.506 INFO [Dummy-2] [retry_document_indexing_task.py:102] - Retry dataset: 7f753103-9619-4a98-b1a6-1691810e87df latency: 1.9819961660541594
2025-08-05 10:25:21.574 INFO [Dummy-2] [trace.py:128] - Task tasks.retry_document_indexing_task.retry_document_indexing_task[abd580ac-047e-4816-944d-d5c129697800] succeeded in 2.050429111113772s: None
@Meshinfo commented on GitHub (Aug 5, 2025):
Fix it , just can't set the region as "global" to use embedding models....need to specific such as "us-west1".
@Armando200108 commented on GitHub (Aug 5, 2025):
So I think we've got all our problems solved, and the issue can be closed :-)