Skip to content

Commit

Permalink
Merge branch 'lancedb:main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
raghavdixit99 authored Jun 13, 2024
2 parents 75ae6a1 + 799d3a6 commit 9134bcd
Show file tree
Hide file tree
Showing 47 changed files with 9,243 additions and 248 deletions.
167 changes: 119 additions & 48 deletions README.md

Large diffs are not rendered by default.

Binary file added assets/imagebind-demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/movie-recommendation-with-genre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/rag_evaluation_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/superagent-autogen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions examples/Code-Documentation-QA-Bot/lancedb_cloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Code documentation Q&A bot example with LangChain

![imgonline-com-ua-twotoone-RaRlTe66ft3RUvK](https://github.com/lancedb/vectordb-recipes/assets/15766192/4682b39d-62f4-4722-bc64-f45d45ec8a22)


This Q&A bot will allow you to query your own documentation easily using questions. We'll also demonstrate the use of LangChain and LanceDB Cloud using the OpenAI API. In this example we'll use **Numpy 1.26** documentation, but, this could be replaced for your own docs as well.
Colab walkthrough - <a href="https://colab.research.google.com/github/lancedb/vectordb-recipes/blob/main/examples/Code-Documentation-QA-Bot/main.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>


### Set credentials
if you would like to set api key through an environment variable:
```
export LANCEDB_API_KEY="sk_..."
```
or
```
import os
import getpass
os.environ["LANCEDB_API_KEY"] = getpass.getpass("Enter Your LANCEDB API Key:")
```

replace the following lines in main.py with your project slug and api key"
```
db_url="db://your-project-slug-name"
api_key="sk_..."
region="us-east-1"
```

### Run the script
```python
OPENAI_API_KEY=... python main.py --query "what is a vectordb?"
```
Loading

0 comments on commit 9134bcd

Please sign in to comment.