mirror of
https://github.com/chroma-core/chroma.git
synced 2026-10-12 02:12:06 +00:00
## Problem Running the gemini example scripts raises `AttributeError`: ``` AttributeError: module 'chromadb.utils.embedding_functions' has no attribute 'GoogleGenerativeAIEmbeddingFunction' ``` Closes #5977. ## Root cause The examples used `GoogleGenerativeAIEmbeddingFunction` (uppercase `AI`), but the actual class defined in `chromadb/utils/embedding_functions/google_embedding_function.py` is `GoogleGenerativeAiEmbeddingFunction` (lowercase `i` in `Ai`). ## Fix Rename the call in `examples/gemini/main.py` and `examples/gemini/load_data.py` to `GoogleGenerativeAiEmbeddingFunction`. ## Verification - `python -c "import ast; ast.parse(open('examples/gemini/main.py').read()); ast.parse(open('examples/gemini/load_data.py').read())"` passes. - `grep -rn GoogleGenerative examples/gemini/` now shows only the correct `Ai` spelling. ## Checklist - [x] Two-file change, examples only - [x] No new dependencies - [x] Commit references the issue
Examples
Searching for community contributions! Join the #contributing Discord Channel to discuss.
This folder will contain an ever-growing set of examples.
The key with examples is that they should always work. The failure mode of examples folders is that they get quickly deprecated.
Examples are:
- Easy to maintain
- Easy to maintain examples are simple
- Use case examples are fine, technology is better
folder structure
- basic_functionality - notebooks with simple walkthroughs
- advanced_functionality - notebooks with advanced walkthroughs
- deployments - how to deploy places
- use_with - chroma + ___, where ___ can be langchain, nextjs, etc
- data - common data for examples
💡 Feel free to open a PR with an example you would like to see
Basic Functionality
- Examples of using different embedding models
- Local persistance demo
- Where filtering demo
Advanced Functionality
- Clustering
- Projections
- Fine tuning
Use With
LLM Application Code
- Langchain
- LlamaIndex
- Semantic Kernal
App Frameworks
- Streamlit
- Gradio
- Nextjs
- Rails
- FastAPI
Inference Services
- Brev.dev
- Banana.dev
- Modal
LLM providers/services
- OpenAI
- Anthropic
- Cohere
- Google PaLM
- Hugging Face
Inspiration
- The OpenAI Cookbook gets a lot of things right