chat-langchain icon indicating copy to clipboard operation
chat-langchain copied to clipboard

Minor fixes to make it easy to run locally.

Open jlewi opened this issue 2 years ago • 0 comments

This is an unsolicited PR so feel free to close. Happy to make revisions as well. This PR fixes a couple minor issues I ran into while attempting to run the chatbot to use for my own purposes.

  • ingest.py and ingest_examples.py raise an exception trying to delete the schemas

    • Catch these exceptions and keep going
    • My guess is the code was written as though the schemas had already been created and therefore wants to recreate them
    • This causes the aforementioned exceptions when starting with a fresh weaviate cluster
  • Here's an example exception

    Traceback (most recent call last): File "/Users/jlewi/git_chat-langchain/ingest.py", line 42, in client.schema.delete_class("Paragraph") File "/opt/homebrew/lib/python3.10/site-packages/weaviate/schema/crud_schema.py", line 201, in delete_class raise UnexpectedStatusCodeException("Delete class from schema", response) weaviate.exceptions.UnexpectedStatusCodeException: Delete class from schema! Unexpected status code: 400, with response body: {'error': [{'message': "could not find class 'Paragraph'"}]}.

  • Update ingest.sh to check if the documents have already been downloaded.

  • Update the README.md with instructions about how to deploy it yourself.

  • Add a .gitignore file

jlewi avatar Feb 04 '23 21:02 jlewi