It demonstrates the use of a router to switch between chains that can handle different things: a vector database with Cohere embeddings; a chat bot that has a prompt with some information about the library; and finally a RAG chatbot that has access to the internet.
For a fuller demo of the book recomendation, consider replacing books_with_blurbs.csv with a larger sample from the following dataset: https://www.kaggle.com/datasets/jdobrow/57000-books-with-metadata-and-blurbs/ .
## Environment Setup
Set the `COHERE_API_KEY` environment variable to access the Cohere models.
## Usage
To use this package, you should first have the LangChain CLI installed:
```shell
pip install -U langchain-cli
```
To create a new LangChain project and install this as the only package, you can do:
```shell
langchain app new my-app --package cohere-librarian
```
If you want to add this to an existing project, you can just run:
```shell
langchain app add cohere-librarian
```
And add the following code to your `server.py` file:
```python
from cohere_librarian.chain import chain as cohere_librarian_chain