Skip to content

Commit

Permalink
fix: Remove langchain-community dependency (#178)
Browse files Browse the repository at this point in the history
* feat: Remove dependency on `langchain-community`

* delete langchain-community requirements

* sort imports

* Update create_vector_embeddings.py
  • Loading branch information
duwenxin99 authored Jul 10, 2024
1 parent 43e721c commit 96fd44d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ authors = [
dependencies = [
"google-cloud-alloydb-connector[asyncpg]>=1.2.0, <2.0.0",
"langchain-core>=0.1.1, <1.0.0",
"langchain-community>=0.0.18, <1.0.0",
"numpy>=1.24.4, <2.0.0",
"pgvector>=0.2.5, <1.0.0",
"SQLAlchemy[asyncio]>=2.0.25, <3.0.0"
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
google-cloud-alloydb-connector[asyncpg]==1.2.0
langchain-core==0.2.12
langchain-community==0.2.7
numpy===1.24.4; python_version <= "3.8"
numpy==1.26.4; python_version > "3.8"
pgvector==0.3.0
Expand Down
2 changes: 1 addition & 1 deletion src/langchain_google_alloydb_pg/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)

import sqlalchemy
from langchain_community.document_loaders.base import BaseLoader
from langchain_core.document_loaders.base import BaseLoader
from langchain_core.documents import Document

from .engine import AlloyDBEngine
Expand Down
2 changes: 1 addition & 1 deletion tests/test_alloydb_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import pytest
import pytest_asyncio
from google.cloud.alloydb.connector import AsyncConnector, IPTypes
from langchain_community.embeddings import FakeEmbeddings
from langchain_core.embeddings import FakeEmbeddings
from sqlalchemy import VARCHAR
from sqlalchemy.ext.asyncio import create_async_engine

Expand Down
2 changes: 1 addition & 1 deletion tests/test_alloydb_vectorstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import pytest
import pytest_asyncio
from langchain_community.embeddings import DeterministicFakeEmbedding
from langchain_core.documents import Document
from langchain_core.embeddings import DeterministicFakeEmbedding

from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore, Column

Expand Down
2 changes: 1 addition & 1 deletion tests/test_alloydb_vectorstore_from_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import pytest
import pytest_asyncio
from langchain_community.embeddings import DeterministicFakeEmbedding
from langchain_core.documents import Document
from langchain_core.embeddings import DeterministicFakeEmbedding

from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore, Column

Expand Down
2 changes: 1 addition & 1 deletion tests/test_alloydb_vectorstore_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import pytest
import pytest_asyncio
import sqlalchemy
from langchain_community.embeddings import DeterministicFakeEmbedding
from langchain_core.documents import Document
from langchain_core.embeddings import DeterministicFakeEmbedding

from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
from langchain_google_alloydb_pg.indexes import (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_alloydb_vectorstore_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import pytest
import pytest_asyncio
from langchain_community.embeddings import DeterministicFakeEmbedding
from langchain_core.documents import Document
from langchain_core.embeddings import DeterministicFakeEmbedding

from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore, Column
from langchain_google_alloydb_pg.indexes import HNSWQueryOptions
Expand Down

0 comments on commit 96fd44d

Please sign in to comment.