embedchain/notebooks/chromadb.ipynb
!pip install embedchain
You can find this env variable on your OpenAI dashboard.
import os
from embedchain import App
os.environ["OPENAI_API_KEY"] = "sk-xxx"
app = App.from_config(config={
"vectordb": {
"provider": "chroma",
"config": {
"collection_name": "my-collection",
"host": "your-chromadb-url.com",
"port": 5200,
"allow_reset": True
}
}
})
app.add("https://www.forbes.com/profile/elon-musk")
while(True):
question = input("Enter question: ")
if question in ['q', 'exit', 'quit']:
break
answer = app.query(question)
print(answer)