mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 23:21:44 -05:00
[PR #12968] [MERGED] feat: support OpenAPI parameter description and enum values in tool spec #46114
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12968
Author: @tremlin
Created: 4/17/2025
Status: ✅ Merged
Merged: 4/18/2025
Merged by: @tjbck
Base:
dev← Head:feat-openapi-parameter-description📝 Commits (1)
3dcbf1afeat: support OpenAPI parameter description and enum values in tool spec📊 Changes
2 files changed (+15 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/tools.py(+10 -1)📝
src/lib/utils/index.ts(+5 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Added
Changed
Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
In the OpenAPI specs that I've come across the
parameteritself has adescriptionproperty whereas theschemausually does not have a description (Example: https://github.com/bump-sh-examples/train-travel-api/blob/main/openapi.yaml).This merge request ensures that both options are taken into account when finalizing the tool server specification. Additionally,
enumvalues are listed individually to assist the AI in utilizing the API function.https://swagger.io/specification/#parameter-object
Here I am not sure if we should replace the text "Possible Values" with something maybe more language-neutral like "Enum". For my tests I've always used the "Possible Values".
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.