mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #5779] [CLOSED] fix: tool description can now be multiline #21754
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/5779
Author: @smonux
Created: 9/28/2024
Status: ❌ Closed
Base:
dev← Head:dev📝 Commits (2)
6bc1528fix: tool description can now be multiline1a658ddformatting📊 Changes
1 file changed (+6 additions, -1 deletions)
View changed files
📝
backend/open_webui/utils/tools.py(+6 -1)📄 Description
Pull Request Checklist
The description of the tool, which the llm uses to decide if it needs to call it, it's currently the second line of the docstring. It's not very intuitive nor it's documented anywhere. Moreover, if the tool is a bit complex is cumbersome to put everything in a single line.
With this change, the description is considered to be everything before the first :param, or the whole docstring if there is none.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
N/A
Added
N/A
Changed
backend/open_webui/utils/tools.py
Deprecated
N/A
Removed
N/A
Fixed
Tools descriptions can be no be multiline.
Security
N/A
Breaking Changes
N/A
Additional Information
Some quick tests, llm generated.
Screenshots or Videos
N/A
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.