LangChain tutorial #4: Build an Ask the Doc app

You may have already solved this so I will post a fix that worked for me that may benefit anyone else running into this problem. Installing the pysqlite3 package solves the problem with mismatched Sqlite3 versions and Chromadb. See the pysqlite3 repository for further details on the package itself.

To implement:

  1. add pysqlite3-binary to requirements.txt
  2. add these to your app file:
import pysqlite3
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
import streamlit as st
import sqlite3
  1. Reboot your app in Streamlit.