googleapis / googleapis/langchain-google-firestore-python

similarity_search_with_score() raises NotImplementedError

Open
#87 1 comment 0 reactions 1 assignee Claimed by @JU-2094 View on GitHub
api: firestore priority: p2 type: feature request
Dominant language
Python
Stars
35
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/langchain-google-firestore-python/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python

If you are still having issues, please be sure to include as much information as possible:

#### Environment details

- OS type and version: MacOS
- Python version: python 3.12
- pip version: 24.0
- `langchain-google-firestore` version: langchain-google-firestore 0.3.0

#### Steps to reproduce

1. Install langchain-google-firestore 0.3.0 and run the code below

#### Code example

```python
from langchain_core.documents import Document
from langchain_google_firestore import FirestoreVectorStore
from langchain_google_vertexai import VertexAIEmbeddings

embeddings = VertexAIEmbeddings(model_name="textembedding-gecko@latest")

# Load data
data = ["blue and yellow makes green", "red and orange makes yellow", "white and black makes grey"]

docs = [Document(page_content=d) for d in data]
vector_store = FirestoreVectorStore.from_documents(
collection="colors",
documents=docs,
embedding=embeddings,
)

vector_store.similarity_search_with_score("green") # this raises NotImplementError
```

#### Stack trace
```
Traceback (most recent call last):
File "/demo/vector_store_demo/main.py", line 21, in
vector_store.similarity_search_with_score("green")
File "/demo/.venv/lib/python3.12/site-packages/langchain_core/vectorstores/base.py", line 679, in similarity_search_with_score
raise NotImplementedError
NotImplementedError
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.