Skip to content

Conversation

@MengqinShen
Copy link
Contributor

Add EmbedderRef, EmbedderOptions, and EmbedderSupports types to enable referencing embedders with specific configurations, matching the Go SDK functionality.

BREAKING CHANGE: define_embedder() now accepts 'options: EmbedderOptions' parameter instead of separate 'config_schema' parameter.

CHANGELOG:

  • Add EmbedderRef, EmbedderOptions, EmbedderSupports types to [embedding.py]
  • Add create_embedder_ref() and embedder_action_metadata() to [embedding.py]
  • Implement embed() method in Genkit class supporting EmbedderRef
  • Update define_embedder() to accept EmbedderOptions parameter
  • Update all plugins (OpenAI, Google GenAI, Ollama) to use JSON schemas
  • Add comprehensive tests for embedder functionality in [embedding_test.py]
  • Update test assertions to match new schema conversion behavior

Add EmbedderRef, EmbedderOptions, and EmbedderSupports types to enable
referencing embedders with specific configurations, matching the Go SDK
functionality.

BREAKING CHANGE: define_embedder() now accepts 'options: EmbedderOptions'
parameter instead of separate 'config_schema' parameter.

Changes:
- Add EmbedderRef, EmbedderOptions, EmbedderSupports types to embedding.py
- Implement embed() method in Genkit class supporting EmbedderRef
- Update define_embedder signature to accept EmbedderOptions parameter
- Fix circular imports using TYPE_CHECKING and proper import organization
- Add to_json_schema() conversions for all config_schema usages
- Update all plugins (OpenAI, Google GenAI, Ollama) to use JSON schemas
- Add comprehensive tests for embedder functionality
- Update test assertions to match new schema conversion behavior
@yesudeep yesudeep changed the title feat(py): add embedder reference support matching Go SDK feat(py): add embedder reference support matching JS SDK Dec 12, 2025
@MengqinShen MengqinShen marked this pull request as ready for review December 12, 2025 22:00
@MengqinShen MengqinShen enabled auto-merge (squash) December 12, 2025 22:02
@MengqinShen MengqinShen merged commit 7d4e73c into main Dec 12, 2025
9 checks passed
@MengqinShen MengqinShen deleted the feat/py-adding-embedder-reference-clean branch December 12, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants