Skip to content

[Bug]: Invalid embedding function GoogleGenerativeAIEmbeddingFunction used in Gemini example #5977

@scotbrew

Description

@scotbrew

What happened?

In examples/gemini/, the load_data.py and main.py scripts incorrectly use to GoogleGenerativeAIEmbeddingFunction instead of the expected GoogleGenerativeAiEmbeddingFunction (difference in capitalization between AI vs Ai).

This results in an error when either of these scripts are executed.
AttributeError: module 'chromadb.utils.embedding_functions' has no attribute 'GoogleGenerativeAIEmbeddingFunction'

Suggested Fix:

Change GoogleGenerativeAIEmbeddingFunction to GoogleGenerativeAiEmbeddingFunction in the example scripts.

Versions

Chroma v1.3.5, Python 3.9.6, MacOS 15.7

Relevant log output

% cd examples/gemini
% python3 load_data.py
...
AttributeError: module 'chromadb.utils.embedding_functions' has no attribute 'GoogleGenerativeAIEmbeddingFunction'

% python3 main.py
...
AttributeError: module 'chromadb.utils.embedding_functions' has no attribute 'GoogleGenerativeAIEmbeddingFunction'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions