Skip to content

fix(go): Made WithTools accept a ToolRef interface #2403

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

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Conversation

apascal07
Copy link
Collaborator

@apascal07 apascal07 commented Mar 20, 2025

ai.WithTools took in a Tool which is a resolved tool action. This works for in-code usages but when loading .prompt files, we only have tool names as strings. We can resolve these but since we load .prompt files at Genkit init, tools won't have been initialized yet and during prompt definition, we convert the tools to tool names to adhere to the GenerateActionOptions interface anyway. But the user experience is still nicer when defining tools and passing those tool references directly so this is the compromise.

Checklist (if applicable):

@apascal07 apascal07 changed the title fix(go): Made WithTool accept a ToolRef interface. fix(go): Made WithTools accept a ToolRef interface Mar 20, 2025
@apascal07 apascal07 merged commit 8e7ca70 into main Mar 20, 2025
8 checks passed
@apascal07 apascal07 deleted the ap/go-tool-ref branch March 20, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants