Integrations#
Besides the installation of this python package, you will also need to install packages and set environment variables depending on which chains you want to use.
Note: the reason these packages are not included in the dependencies by default is that as we imagine scaling this package, we do not want to force dependencies that are not needed.
The following use cases require specific installs and api keys:
OpenAI:
Install requirements with
pip install openaiGet an OpenAI api key and either set it as an environment variable (
OPENAI_API_KEY) or pass it to the LLM constructor asopenai_api_key.
Cohere:
Install requirements with
pip install cohereGet a Cohere api key and either set it as an environment variable (
COHERE_API_KEY) or pass it to the LLM constructor ascohere_api_key.
GooseAI:
Install requirements with
pip install openaiGet an GooseAI api key and either set it as an environment variable (
GOOSEAI_API_KEY) or pass it to the LLM constructor asgooseai_api_key.
Hugging Face Hub
Install requirements with
pip install huggingface_hubGet a Hugging Face Hub api token and either set it as an environment variable (
HUGGINGFACEHUB_API_TOKEN) or pass it to the LLM constructor ashuggingfacehub_api_token.
Petals:
Install requirements with
pip install petalsGet an GooseAI api key and either set it as an environment variable (
HUGGINGFACE_API_KEY) or pass it to the LLM constructor ashuggingface_api_key.
CerebriumAI:
Install requirements with
pip install cerebriumGet a Cerebrium api key and either set it as an environment variable (
CEREBRIUMAI_API_KEY) or pass it to the LLM constructor ascerebriumai_api_key.
PromptLayer:
Install requirements with
pip install promptlayer(be sure to be on version 0.1.62 or higher)Get an API key from promptlayer.com and set it using
promptlayer.api_key=<API KEY>
SerpAPI:
Install requirements with
pip install google-search-resultsGet a SerpAPI api key and either set it as an environment variable (
SERPAPI_API_KEY) or pass it to the LLM constructor asserpapi_api_key.
GoogleSearchAPI:
Install requirements with
pip install google-api-python-clientGet a Google api key and either set it as an environment variable (
GOOGLE_API_KEY) or pass it to the LLM constructor asgoogle_api_key. You will also need to set theGOOGLE_CSE_IDenvironment variable to your custom search engine id. You can pass it to the LLM constructor asgoogle_cse_idas well.
WolframAlphaAPI:
Install requirements with
pip install wolframalphaGet a Wolfram Alpha api key and either set it as an environment variable (
WOLFRAM_ALPHA_APPID) or pass it to the LLM constructor aswolfram_alpha_appid.
NatBot:
Install requirements with
pip install playwright
Wikipedia:
Install requirements with
pip install wikipedia
Elasticsearch:
Install requirements with
pip install elasticsearchSet up Elasticsearch backend. If you want to do locally, this is a good guide.
FAISS:
Install requirements with
pip install faissfor Python 3.7 andpip install faiss-cpufor Python 3.10+.
Manifest:
Install requirements with
pip install manifest-ml(Note: this is only available in Python 3.8+ currently).
OpenSearch:
Install requirements with
pip install opensearch-pyIf you want to set up OpenSearch on your local, here
DeepLake:
Install requirements with
pip install deeplake
LlamaCpp:
Install requirements with
pip install llama-cpp-pythonDownload model and convert following llama.cpp instructions
Milvus:
Install requirements with
pip install pymilvusIn order to setup a local cluster, take a look here.
Zilliz:
Install requirements with
pip install pymilvusTo get up and running, take a look here.
If you are using the NLTKTextSplitter or the SpacyTextSplitter, you will also need to install the appropriate models. For example, if you want to use the SpacyTextSplitter, you will need to install the en_core_web_sm model with python -m spacy download en_core_web_sm. Similarly, if you want to use the NLTKTextSplitter, you will need to install the punkt model with python -m nltk.downloader punkt.