Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在第五步时报错,我检查了库的安装,都是没问题的,前四步也能正常运行(我是在windows上跑的,第三步下载pdf我是手动下载),还有pdf的页数更新成114页了,不知道这是否是错误的原因 #7

Open
spiderLL2002 opened this issue Aug 15, 2024 · 0 comments

Comments

@spiderLL2002
Copy link


AttributeError Traceback (most recent call last)
Cell In[13], line 10
6 split_docs = text_splitter.split_documents(docs)
8 embeddings = OpenAIEmbeddings()
---> 10 vectorstore = Chroma.from_documents(split_docs, embeddings, collection_name="serverless_guide")

File d:\MINIconda\envs\lc\lib\site-packages\langchain\vectorstores\chroma.py:564, in Chroma.from_documents(cls, documents, embedding, ids, collection_name, persist_directory, client_settings, client, collection_metadata, **kwargs)
562 texts = [doc.page_content for doc in documents]
563 metadatas = [doc.metadata for doc in documents]
--> 564 return cls.from_texts(
565 texts=texts,
566 embedding=embedding,
567 metadatas=metadatas,
568 ids=ids,
569 collection_name=collection_name,
570 persist_directory=persist_directory,
571 client_settings=client_settings,
572 client=client,
573 collection_metadata=collection_metadata,
574 **kwargs,
575 )

File d:\MINIconda\envs\lc\lib\site-packages\langchain\vectorstores\chroma.py:528, in Chroma.from_texts(cls, texts, embedding, metadatas, ids, collection_name, persist_directory, client_settings, client, collection_metadata, **kwargs)
500 """Create a Chroma vectorstore from a raw documents.
...
52 ),
53 before_sleep=before_sleep_log(logger, logging.WARNING),
54 )

AttributeError: module 'openai' has no attribute 'error'
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant