Skip to content
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

feat(py): add tool support for openai-compat plugin #2446

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

timere-nemo
Copy link
Contributor

Add tool support for OpenAI compat plugin:

  • detects and extracts tool call information
  • looks up the corresponding tool/action via the GenkitRegistry
  • validates and executes the tool using the defined input schema
  • formats the result into a tool message and appends it to the conversation
  • re-queries OpenAI with the tool result included, continuing the flow seamlessly.

(Also includes a fix for the action context)

Checklist (if applicable):

@timere-nemo timere-nemo self-assigned this Mar 24, 2025
@github-actions github-actions bot added the python Python label Mar 24, 2025
@timere-nemo timere-nemo marked this pull request as ready for review March 25, 2025 12:54
@timere-nemo timere-nemo force-pushed the ryermilov/openai-compat-tool-calls branch from 11b4438 to 7703192 Compare March 25, 2025 13:09
@timere-nemo timere-nemo merged commit bc590d5 into main Mar 26, 2025
13 checks passed
@timere-nemo timere-nemo deleted the ryermilov/openai-compat-tool-calls branch March 26, 2025 12:52
@timere-nemo timere-nemo linked an issue Mar 27, 2025 that may be closed by this pull request
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.

[py] openai: add tools calling
2 participants