Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langchain vectorstore integration with Kinetica #14654

Closed
wants to merge 96 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
9f4009a
Kinetica langchain integration with tests
am-kinetica Nov 21, 2023
7059e36
Added gpudb v7.2.0.0b0 from Pypi
am-kinetica Nov 28, 2023
6a70cb7
Linting done according to contrib guidelines
am-kinetica Nov 30, 2023
519036a
Merged langchain:main into fork
am-kinetica Dec 7, 2023
41e5ace
Merge remote-tracking branch 'upstream/master'
am-kinetica Dec 7, 2023
c9c26c8
Updated poetry lock file
am-kinetica Dec 7, 2023
4053ea0
Made some dependencies optional
am-kinetica Dec 7, 2023
19b682c
Removed test ordering
am-kinetica Dec 7, 2023
2f92168
Minor change
am-kinetica Dec 7, 2023
d1c7b6a
Added 'gpudb' to all
am-kinetica Dec 7, 2023
08470d8
Added 'gpudb' to 'extended_testing' group
am-kinetica Dec 8, 2023
dd809fd
Minor change
am-kinetica Dec 8, 2023
b0da784
Merged main into fork
am-kinetica Dec 11, 2023
fdc2a0e
Merged main with fork
am-kinetica Dec 11, 2023
33b05c4
Merge remote-tracking branch 'upstream/master'
am-kinetica Dec 11, 2023
a06bfaa
Updated poetry.lock file
am-kinetica Dec 11, 2023
9fba6cc
Updated gpudb dependency
am-kinetica Dec 11, 2023
7526096
Updated 'gpudb' dependency
am-kinetica Dec 11, 2023
c386b98
Organized imports in kinetica.py
am-kinetica Dec 11, 2023
a379f17
Removed 'gpudb' as a mandatory import
am-kinetica Dec 12, 2023
8903293
Formatted tests; removed extra long lines
am-kinetica Dec 12, 2023
0677b73
Reformatted
am-kinetica Dec 12, 2023
3363f02
Run 'mypy'
am-kinetica Dec 12, 2023
509140a
Removed print statement from test
am-kinetica Dec 12, 2023
284fc1e
REformatted with 'ruff'
am-kinetica Dec 12, 2023
c52d187
Updated pyproject.toml
am-kinetica Dec 12, 2023
26c1df5
Removed class level imports in 'Kinetica'
am-kinetica Dec 13, 2023
21aa436
Minor change in __init__.py
am-kinetica Dec 13, 2023
a844b40
Removed Kinetica from __init__.py
am-kinetica Dec 13, 2023
c014ae7
Merge remote-tracking branch 'upstream/master'
am-kinetica Dec 13, 2023
9fa989f
Merged main to fork
am-kinetica Dec 13, 2023
9a7702b
Changed according to the new structure, moved Kinetica to community
am-kinetica Dec 13, 2023
dfc4140
Modified code according to new module structure
am-kinetica Dec 13, 2023
c96fe33
Modified __init__.py according to new module structure
am-kinetica Dec 13, 2023
da898a9
Removed Kinetica from __init__.py
am-kinetica Dec 13, 2023
4ca80c4
Added back Kinetica and other related classes to __init__.py
am-kinetica Dec 13, 2023
4cb5a93
Added DistanceStrategy, KineticaSettings to exception list for checki…
am-kinetica Dec 13, 2023
a236769
Merge branch 'master' into master
am-kinetica Dec 15, 2023
496484c
Updated poetry.lock file
am-kinetica Dec 15, 2023
fa701dc
Merge remote-tracking branch 'upstream/master'
am-kinetica Jan 2, 2024
99a7168
Updated poetry lock file
am-kinetica Jan 2, 2024
d03c1b5
Removed modifications in __init__.py
am-kinetica Jan 2, 2024
ee395bc
Removed comments
am-kinetica Jan 2, 2024
84135ab
Merge branch 'master' of github.com:kineticadb/langchain
am-kinetica Jan 10, 2024
a883109
Updated poetry.lock file
am-kinetica Jan 10, 2024
826aa1b
Updated integration test with retriever tests
am-kinetica Jan 11, 2024
122b3fa
Updated import in integration test
am-kinetica Jan 11, 2024
73dd85b
Merge remote-tracking branch 'upstream/master'
am-kinetica Jan 11, 2024
7b82453
Modified import in integration test
am-kinetica Jan 11, 2024
1147cfb
Reformatted test
am-kinetica Jan 11, 2024
34e5fd9
Reformatted test
am-kinetica Jan 11, 2024
830ad38
Reformatted test
am-kinetica Jan 11, 2024
3f56e48
Re-organized imports in test
am-kinetica Jan 11, 2024
10b3fdf
Modified an assertion in test
am-kinetica Jan 11, 2024
7663701
Run ruff format on the test
am-kinetica Jan 11, 2024
e54e4c3
Merge remote-tracking branch 'upstream/master'
am-kinetica Jan 17, 2024
58e0929
Updated poetry lock files
am-kinetica Jan 17, 2024
9fd4673
Merge remote-tracking branch 'upstream/master'
am-kinetica Jan 19, 2024
e79542d
Updated poetry lock file
am-kinetica Jan 19, 2024
7bf3158
Reverted poetry lock changes
am-kinetica Jan 19, 2024
fe4971b
Merge branch 'langchain-ai:master' into master
am-kinetica Jan 19, 2024
e72aea1
Deleted Kinetica exports from langchain main
am-kinetica Jan 19, 2024
8a7b71c
Merge remote-tracking branch 'upstream/master'
am-kinetica Feb 8, 2024
9a6090c
Merge remote-tracking branch 'upstream/master'
am-kinetica Feb 8, 2024
92e8445
Modified vectorstore dimension detection
am-kinetica Feb 12, 2024
4e87458
Merge remote-tracking branch 'upstream/master'
am-kinetica Feb 12, 2024
3db6206
Removed print statement
am-kinetica Feb 13, 2024
8c58988
Updated poetry.lock and addressed lint errors
am-kinetica Feb 13, 2024
e2598b2
Formatted with ruff
am-kinetica Feb 13, 2024
555dba0
Merge remote-tracking branch 'upstream/master'
am-kinetica Feb 13, 2024
2ed2a00
Modified init method and merged upstream
am-kinetica Feb 13, 2024
d2d3f1b
Added notebook and removed dimensions from constructor
am-kinetica Feb 19, 2024
df1a782
Corrected lint errors
am-kinetica Feb 19, 2024
6ad62b9
Merge remote-tracking branch 'upstream/master'
am-kinetica Feb 19, 2024
c1dd200
Adding Kinetica LLM
chadj2 Feb 20, 2024
1c580b4
fix python 3.8 errors
chadj2 Feb 20, 2024
e44652c
Fixes for python 3.8.
chadj2 Feb 20, 2024
20ac18c
Adding comments
chadj2 Feb 20, 2024
a372671
Fix docstring formatting
chadj2 Feb 20, 2024
b80d9e2
Fix for spell checker.
chadj2 Feb 20, 2024
a357014
Adding notebook for Kinetica chat.
chadj2 Feb 21, 2024
6f31f2d
Minor changes
am-kinetica Feb 21, 2024
c4c9114
Merge branch 'master' of github.com:kineticadb/langchain
am-kinetica Feb 21, 2024
a3b448b
Removed poetry lock files
am-kinetica Feb 21, 2024
acd6225
Merge remote-tracking branch 'upstream/master'
am-kinetica Feb 21, 2024
336541c
Renamed Kinetica to KineticaVectorStore
am-kinetica Feb 21, 2024
1764adb
Updated poetry lock file
am-kinetica Feb 21, 2024
5e547fe
Rectified lint errors
am-kinetica Feb 21, 2024
9c505b4
imports organized
am-kinetica Feb 21, 2024
a73f7af
Poetry lock added
am-kinetica Feb 21, 2024
1c2281e
Reformatted docs/docs/integrations/chat/kinetica.ipynb
am-kinetica Feb 21, 2024
04c6c2c
Reformatted docs/docs/integrations/vectorstores/kinetica.ipynb
am-kinetica Feb 21, 2024
223e430
Modified chat notebook
am-kinetica Feb 21, 2024
73ba00b
Modified import order
am-kinetica Feb 21, 2024
421518b
Modified import order
am-kinetica Feb 21, 2024
b182264
Organized imports
am-kinetica Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
648 changes: 648 additions & 0 deletions docs/docs/integrations/chat/kinetica.ipynb

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions docs/docs/integrations/providers/kinetica.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Kinetica

[Kinetica](https://www.kinetica.com/) is a real-time database purpose built for enabling
analytics and generative AI on time-series & spatial data.

## Chat Model

The Kinetica LLM wrapper uses the [Kinetica SqlAssist
LLM](https://docs.kinetica.com/7.2/sql-gpt/concepts/) to transform natural language into
SQL to simplify the process of data retrieval.

See [Kinetica SqlAssist LLM Demo](/docs/integrations/chat/kinetica) for usage.

```python
from langchain_community.chat_models.kinetica import KineticaChatLLM
```

## Vector Store

The Kinetca vectorstore wrapper leverages Kinetica's native support for [vector
similarity search](https://docs.kinetica.com/7.2/vector_search/).

See [Kinetica Vectorsore API](/docs/integrations/vectorstores/kinetica) for usage.

```python
from langchain_community.vectorstores import Kinetica
```

581 changes: 581 additions & 0 deletions docs/docs/integrations/vectorstores/kinetica.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/community/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extended_tests:
PYTHON_FILES=.
MYPY_CACHE=.mypy_cache
lint format: PYTHON_FILES=.
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/community -name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/community --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
lint_package: PYTHON_FILES=langchain_community
lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
Expand Down
2 changes: 2 additions & 0 deletions libs/community/langchain_community/chat_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from langchain_community.chat_models.hunyuan import ChatHunyuan
from langchain_community.chat_models.javelin_ai_gateway import ChatJavelinAIGateway
from langchain_community.chat_models.jinachat import JinaChat
from langchain_community.chat_models.kinetica import KineticaChatLLM
from langchain_community.chat_models.konko import ChatKonko
from langchain_community.chat_models.litellm import ChatLiteLLM
from langchain_community.chat_models.litellm_router import ChatLiteLLMRouter
Expand Down Expand Up @@ -97,4 +98,5 @@
"GPTRouter",
"ChatYuan2",
"ChatZhipuAI",
"KineticaChatLLM",
]
Loading
Loading