Skip to content

refactor(js): refactored dynamic action variants of models, embedders, background models, etc. into separate fns #3417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented Aug 14, 2025

Checklist (if applicable):

*/
export function embedder<ConfigSchema extends z.ZodTypeAny = z.ZodTypeAny>(
options: EmbedderOptions<ConfigSchema>,
runner: (
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

one thing of note: the embedder factory runner function signature is different from defineEmbedder. The new one is more aligned with the action interface, allowing access to context, etc.

* Defines a dynamic resource. Dynamic resources are just like regular resources but will not be
* registered in the Genkit registry and can be defined dynamically at runtime.
*/
export function resource(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

standardizing on naming, s/dynamicResource/resource/

* Defines a dynamic tool. Dynamic tools are just like regular tools but will not be registered in the
* Genkit registry and can be defined dynamically at runtime.
*/
export function tool<I extends z.ZodTypeAny, O extends z.ZodTypeAny>(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

standardizing on naming, s/dynamicTool/tool/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant