Open Hikizzz opened 1 month ago
Hello, it appears you have a comma on the first line: embeddings=HuggingFaceBgeEmbeddings(model_name="BAAI/bge-m3"),
class A:
def embed_documents(self, texts):
return texts
V=A(),
a,b = V.embed_documents([1,2])
AttributeError: 'tuple' object has no attribute 'embed_documents'
Does the issue persist without it?
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_withvariable
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_withvariable
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