langchain-kinetica

Kinetica intefrace for Langchain.


License
Other
Install
pip install langchain-kinetica==1.0.0

Documentation

langchain-kinetica

PyPI version Release Notes CI

Kinetica intefrace for Langchain. See the LLM documentation for an overview of the Kinetica LLM.

1. Prerequisites

To use langchain with Kinetica you will need:

  • Python runtime >3.10
  • Kinetica SqlAssist LLM
  • Kinetica instance >7.2.0 configured to use SqlAssist.

2. Package Contents

  • KineticaChatLLM: ChatModel for converting natural language to SQL.
  • KineticaSqlOutputParser: OutputParser that will execute SQL from the KineticaChatLLM.
  • SqlResponse: If the Kinetica chain ends with KineticaSqlOutputParser then this response will contain the generated SQL and results from its execution.

3. Installation

You can install this project from pypi.

$ pip install langchain-kinetica

For a pre-release version you can install directly from the repository.

$ pip install "langchain-kinetica @ git+ssh://git@github.com/kineticadb/langchain-kinetica.git"

4. Usage

See the Kinetica LLM Demo notebook for examples.

5. Building

Install the project locally.

$ pip install --editable .

You will need to install the build utility.

$ pip install --upgrade build

Build the project

$ python3 -m build

The build will generate a .whl file that can be distributed.

$ ls -1 ./dist
langchain-kinetica-1.0.tar.gz
langchain_kinetica-1.0-py3-none-any.whl

6. See Also