No project description provided
Project description
cuminai
This package contains the Cumin AI Python SDK. Cumin AI is a Managed LLM Context Service. This package provides integration with Langchain.
Installation
pip install cuminai
In the rare scenario, if you are on Windows, and you get File Too Long
error for any dependency package while installing cuminai
. Run the below command to fix it.
git config --global core.longpaths true
Usage
The cuminai
class helps easily access the Cumin AI Context store.
# Setup API key
import os
from getpass import getpass
CUMINAI_API_KEY = getpass("Enter Cumin AI API Key: ")
os.environ["CUMINAI_API_KEY"] = CUMINAI_API_KEY
# Access Cumin AI Client
from cuminai import CuminAI
embedding = ... # use a LangChain Embeddings class
client = CuminAI(
source="<Cumin AI Context Source>",
embedding_function = embedding
)
# Get Langchain retreiver for Appending to Chain.
num_docs_to_retrieve = ... # number of docs to retrieve. Defaults to 4
retriever = client.as_retriever(search_kwargs={"k": num_docs_to_retrieve})
Release
Currently Cumin AI is in pre-release
mode. We have exciting things planned. You can check out our roadmap to know more.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cuminai-0.0.1.dev165.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for cuminai-0.0.1.dev165-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4d59cbc71313388d8c4e412ee60a42b310e24aabeb0905f12bfcb42cafa7cc5 |
|
MD5 | 0b25a924587af0708c9313a235135493 |
|
BLAKE2b-256 | a798331afad13b4398fca34f836d2cf53cde8d9d6630bb47b1f40491802cf9de |