Before submitting, make sure you've checked the following:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Fix tools metadata generation to handle nested types such as list[Optional[tuple[int, str]]] etc.
Fix docstring description going over multiple lines
Fixed
Fix tools metadata generation to handle nested types such as list[Optional[tuple[int, str]]] etc.
Fix docstring description going over multiple lines
Sample search tool that takes list[str] as argument
Weather tool
Could use more testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/7182
**Author:** [@michaelpoluektov](https://github.com/michaelpoluektov)
**Created:** 11/21/2024
**Status:** ✅ Merged
**Merged:** 11/22/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `fix/tools-metadata`
---
### 📝 Commits (6)
- [`3dfea83`](https://github.com/open-webui/open-webui/commit/3dfea834ca44d0a6ba32c8d29ab7cf9d53a85140) Merge branch 'dev' of https://github.com/open-webui/open-webui into dev
- [`7083814`](https://github.com/open-webui/open-webui/commit/70838148e77f77b1577899e416c5871ba36260b5) fix tools metadata
- [`c03bfd1`](https://github.com/open-webui/open-webui/commit/c03bfd141e3a34e636f834f8ef2f8aa6c2f5f591) fix optional args not present
- [`6783c98`](https://github.com/open-webui/open-webui/commit/6783c98539951a993ec4ccc89e993b19aed646f9) Merge branch 'dev' of https://github.com/open-webui/open-webui into fix/tools-metadata
- [`e1a85c9`](https://github.com/open-webui/open-webui/commit/e1a85c99ab04191954537bd4149765c4bb632389) format
- [`8abf5d5`](https://github.com/open-webui/open-webui/commit/8abf5d57c1b34040762770fefa509760c8449c19) remove unused schemas file
### 📊 Changes
**6 files changed** (+109 additions, -234 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/apps/retrieval/main.py` (+3 -1)
📝 `backend/open_webui/apps/retrieval/web/mojeek.py` (+2 -3)
📝 `backend/open_webui/apps/webui/routers/tools.py` (+25 -29)
📝 `backend/open_webui/main.py` (+0 -1)
➖ `backend/open_webui/utils/schemas.py` (+0 -112)
📝 `backend/open_webui/utils/tools.py` (+79 -88)
</details>
### 📄 Description
# Pull Request Checklist
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for validating the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
- Fix tools metadata generation to handle nested types such as `list[Optional[tuple[int, str]]]` etc.
- Fix docstring description going over multiple lines
### Fixed
- Fix tools metadata generation to handle nested types such as `list[Optional[tuple[int, str]]]` etc.
- Fix docstring description going over multiple lines
### Testing
Tested functions:
- openai_react_langfuse: https://openwebui.com/f/michaelpoluektov/react_agent
- Default OpenAI tool calling (filter pre-pending)
Tools:
- Sample search tool that takes `list[str]` as argument
- Weather tool
Could use more testing
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/7182
Author: @michaelpoluektov
Created: 11/21/2024
Status: ✅ Merged
Merged: 11/22/2024
Merged by: @tjbck
Base:
dev← Head:fix/tools-metadata📝 Commits (6)
3dfea83Merge branch 'dev' of https://github.com/open-webui/open-webui into dev7083814fix tools metadatac03bfd1fix optional args not present6783c98Merge branch 'dev' of https://github.com/open-webui/open-webui into fix/tools-metadatae1a85c9format8abf5d5remove unused schemas file📊 Changes
6 files changed (+109 additions, -234 deletions)
View changed files
📝
backend/open_webui/apps/retrieval/main.py(+3 -1)📝
backend/open_webui/apps/retrieval/web/mojeek.py(+2 -3)📝
backend/open_webui/apps/webui/routers/tools.py(+25 -29)📝
backend/open_webui/main.py(+0 -1)➖
backend/open_webui/utils/schemas.py(+0 -112)📝
backend/open_webui/utils/tools.py(+79 -88)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
list[Optional[tuple[int, str]]]etc.Fixed
list[Optional[tuple[int, str]]]etc.Testing
Tested functions:
Tools:
list[str]as argumentCould use more testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.