You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/HwHiAiUser/aircasLLM/src/langchain/toolkit.py", line 126, in
print(textSimChain.invoke({
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 4713, in invoke
return self._call_with_config(
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1927, in call_with_config
context.run(
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/config.py", line 396, in call_func_with_variable
return func(input, **kwargs) # type: ignore[call-arg]
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 4567, in invoke
output = call_func_with_variable_args(
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/config.py", line 396, in call_func_with_variable
return func(input, **kwargs) # type: ignore[call-arg]
File "/home/HwHiAiUser/aircasLLM/src/langchain/toolkit.py", line 73, in textSimChain
vector_a,vector_b = embeddings.embed_documents([text1, text2])
AttributeError: 'tuple' object has no attribute 'embed_documents'
Description
I'm trying to encoding two strings to vector using embeddings.embed_documents().but not works
I have done itcorrectly on ubuntu18,x86 pc with nvidia gpu and intel cpu,using ollamaEmbedding().
but when transferring it to .ky10.aarch64,it doesn‘t work.
i have tested lastest version and my old version,including langchain(v0.2.1,0.3.4),langchain_core(v0.2.26,v0.3.3),langchain_community(v0.2.10,v0.3.3)
i have test HuggingFaceBgeEmbeddings,HuggingFaceEmbeddings,AscendEmbeddings(using npu on this server),the erro information is same.
i have test online models(autoDownload by HuggingFaceEmbeddings) and local model,include BAAI/bge-m3 and aspire/acge_text_embedding.
other langchain library or functions work including langchain_core.runnables,langchain_openai,....
it seems the error **only occurs in funtcntions decorated by "@chain" !**I make a custiomEmbedding class inherited from embeddings and baseModel from langchain_core and test it isolated i,it works.but putting it in a chainFuction,it works bad.
System Info
System Information
OS: Linux
OS Version: #1 SMP Sun Jun 28 14:27:40 CST 2020
Python Version: 3.10.15 (main, Oct 3 2024, 07:21:53) [GCC 11.2.0]
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Traceback (most recent call last):
File "/home/HwHiAiUser/aircasLLM/src/langchain/toolkit.py", line 126, in
print(textSimChain.invoke({
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 4713, in invoke
return self._call_with_config(
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1927, in call_with_config
context.run(
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/config.py", line 396, in call_func_with_variable
return func(input, **kwargs) # type: ignore[call-arg]
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 4567, in invoke
output = call_func_with_variable_args(
File "/usr/local/miniconda3/envs/dg/lib/python3.10/site-packages/langchain_core/runnables/config.py", line 396, in call_func_with_variable
return func(input, **kwargs) # type: ignore[call-arg]
File "/home/HwHiAiUser/aircasLLM/src/langchain/toolkit.py", line 73, in textSimChain
vector_a,vector_b = embeddings.embed_documents([text1, text2])
AttributeError: 'tuple' object has no attribute 'embed_documents'
Description
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: