Skip to content

Commit

Permalink
astradb: move to langchain-datastax repo (langchain-ai#18354)
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis authored and gkorland committed Mar 30, 2024
1 parent 931485e commit 2947bd5
Show file tree
Hide file tree
Showing 28 changed files with 16 additions and 5,490 deletions.
8 changes: 5 additions & 3 deletions .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@
dirs_to_run["extended-test"].add(dir_)
elif file.startswith("libs/partners"):
partner_dir = file.split("/")[2]
if os.path.isdir(f"libs/partners/{partner_dir}") and os.listdir(
f"libs/partners/{partner_dir}"
) != ["README.md"]:
if os.path.isdir(f"libs/partners/{partner_dir}") and [
filename
for filename in os.listdir(f"libs/partners/{partner_dir}")
if not filename.startswith(".")
] != ["README.md"]:
dirs_to_run["test"].add(f"libs/partners/{partner_dir}")
# Skip if the directory was deleted or is just a tombstone readme
elif file.startswith("libs/"):
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/api_doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ jobs:
with:
repository: langchain-ai/langchain-google
path: langchain-google
- uses: actions/checkout@v4
with:
repository: langchain-ai/langchain-datastax
path: langchain-datastax
- name: Move google libs
run: |
rm -rf langchain/libs/partners/google-genai langchain/libs/partners/google-vertexai
rm -rf \
langchain/libs/partners/google-genai \
langchain/libs/partners/google-vertexai \
langchain/libs/partners/astradb
mv langchain-google/libs/genai langchain/libs/partners/google-genai
mv langchain-google/libs/vertexai langchain/libs/partners/google-vertexai
mv langchain-datastax/libs/astradb langchain/libs/partners/astradb
- name: Set Git config
working-directory: langchain
Expand Down
21 changes: 0 additions & 21 deletions libs/partners/astradb/LICENSE

This file was deleted.

66 changes: 0 additions & 66 deletions libs/partners/astradb/Makefile

This file was deleted.

69 changes: 2 additions & 67 deletions libs/partners/astradb/README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
# langchain-astradb
This package has moved!

This package contains the LangChain integrations for using DataStax Astra DB.

> DataStax [Astra DB](https://docs.datastax.com/en/astra/home/astra.html) is a serverless vector-capable database built on Apache Cassandra® and made conveniently available
> through an easy-to-use JSON API.
_**Note.** For a short transitional period, only some of the Astra DB integration classes are contained in this package (the remaining ones being still in `langchain-community`). In a short while, and surely by version 0.2 of LangChain, all of the Astra DB support will be removed from `langchain-community` and included in this package._

## Installation and Setup

Installation of this partner package:

```bash
pip install langchain-astradb
```

## Integrations overview

### Vector Store

```python
from langchain_astradb import AstraDBVectorStore

my_store = AstraDBVectorStore(
embedding=my_embeddings,
collection_name="my_store",
api_endpoint="https://...",
token="AstraCS:...",
)
```

### Chat message history

```python
from langchain_astradb import AstraDBChatMessageHistory
message_history = AstraDBChatMessageHistory(
session_id="test-session",
api_endpoint="...",
token="...",
)
```

### Store

```python
from langchain_astradb import AstraDBStore
store = AstraDBStore(
collection_name="my_kv_store",
api_endpoint="...",
token="..."
)
```

### Byte Store

```python
from langchain_astradb import AstraDBByteStore
store = AstraDBByteStore(
collection_name="my_kv_store",
api_endpoint="...",
token="..."
)
```

## Reference

See the [LangChain docs page](https://python.langchain.com/docs/integrations/providers/astradb) for a more detailed listing.
https://github.com/langchain-ai/langchain-datastax/tree/main/libs/astradb
10 changes: 0 additions & 10 deletions libs/partners/astradb/langchain_astradb/__init__.py

This file was deleted.

148 changes: 0 additions & 148 deletions libs/partners/astradb/langchain_astradb/chat_message_histories.py

This file was deleted.

Empty file.
Loading

0 comments on commit 2947bd5

Please sign in to comment.