Skip to content

Conversation

@kylediaz
Copy link
Contributor

@kylediaz kylediaz commented Dec 3, 2025

This updates the sample code to show how to use custom EFs correctly. The old snippets would result in legacy EFs.

You need to register the EF, and if you don't define the extra functions it's considered a legacy EF.

@kylediaz kylediaz requested a review from itaismith December 3, 2025 18:31
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Dec 3, 2025

Update custom embedding function documentation examples

Refreshes the custom embedding function examples to reflect current registration and persistence requirements. Adds richer Python and TypeScript snippets that demonstrate naming, configuration serialization, and rebuild hooks alongside the register_embedding_function decorator.

Key Changes

• Expanded the Python example MyEmbeddingFunction to include register_embedding_function, constructor storage of model, name, get_config, and build_from_config helpers using Dict[str, Any]
• Replaced the TypeScript example with a class that exposes name, getConfig, validateConfigUpdate, and buildFromConfig, while returning placeholder embeddings and preserving configuration
• Maintained the provider/package table formatting adjustments to normalize spacing in the TypeScript embedding packages list

Affected Areas

• docs/docs.trychroma.com/markdoc/content/docs/embeddings/embedding-functions.md

This summary was automatically generated by @propel-code-bot

You need to register the EF, and if you don't define the extra functions it's considered a legacy EF.
Copy link
Contributor Author

kylediaz commented Dec 6, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

| [Together AI](../../integrations/embedding-models/together-ai) |||


For TypeScript users, Chroma provides packages for a number of embedding model providers. The Chromadb python package ships will all embedding functions included.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advisory

[Documentation] Fix grammar: “ships will” should be “ships with.”

Context for Agents
[**Documentation**]

Fix grammar: “ships will” should be “ships with.”

File: docs/docs.trychroma.com/markdoc/content/docs/embeddings/embedding-functions.md
Line: 26

…ing-functions.md

Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants