Faiss.from_texts () ESSIGEN VALUEEREERROR: Eingabe nicht ein Numpy -Array

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Faiss.from_texts () ESSIGEN VALUEEREERROR: Eingabe nicht ein Numpy -Array

by Anonymous » 21 Mar 2025, 00:19

Code: Select all

vec_multi = embedding.embed_documents(pdf_chunks)

import numpy as np
vec_np = np.array(vec_multi)

print(vec_np.shape)  # (문장 개수, 임베딩 차원)
print(vec_np.dtype)

(2119, 768)
float64

embedding_model_name = "jhgan/ko-sbert-nli"  # 임베딩 모델 선택
embedding = HuggingFaceEmbeddings(model_name=embedding_model_name)
---> pdf_vector_store = FAISS.from_texts(pdf_chunks, embedding=embedding)

ValueError: input not a numpy array
Ich überprüfe, dass PDF_Chunks Numpy Array ist, aber es machte einen solchen Fehler
Ich weiß nicht, was das Problem ist, und ich weiß nicht, wie ich es lösen soll.

Top