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

error when ingesting #15

Open
xingfanxia opened this issue Mar 22, 2023 · 1 comment
Open

error when ingesting #15

xingfanxia opened this issue Mar 22, 2023 · 1 comment

Comments

@xingfanxia
Copy link

Getting this error with ingesting

[''] is not valid under any of the given schemas
Traceback (most recent call last):
  File "/Users/xingfanxia/projects/notion-qa/ingest.py", line 32, in <module>
    store = FAISS.from_texts(docs, OpenAIEmbeddings(), metadatas=metadatas)
  File "/opt/homebrew/lib/python3.10/site-packages/langchain/vectorstores/faiss.py", line 168, in from_texts
    embeddings = embedding.embed_documents(texts)
  File "/opt/homebrew/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 87, in embed_documents
    responses = [
  File "/opt/homebrew/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 88, in <listcomp>
    self._embedding_func(text, engine=self.document_model_name)
  File "/opt/homebrew/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 76, in _embedding_func
    return self.client.create(input=[text], engine=engine)["data"][0]["embedding"]
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_resources/embedding.py", line 33, in create
    response = super().create(*args, **kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_requestor.py", line 226, in request
    resp, got_stream = self._interpret_response(result, stream)
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_requestor.py", line 619, in _interpret_response
    self._interpret_response_line(
  File "/opt/homebrew/lib/python3.10/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: [''] is not valid under any of the given schemas - 'input'
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