Description: Briefly describe the changes 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 the changes?
Code Review: Have you self-reviewed your code and addressed any coding standard issues?
Description
Specify a max output tokens of 50 for both Ollama and OpenAI when generating titles, so even if the model goes off the rails and generates a large chunk of text, it doesn't cost more than 50 tokens.
🔄 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/2001
**Author:** [@cheahjs](https://github.com/cheahjs)
**Created:** 5/6/2024
**Status:** ✅ Merged
**Merged:** 5/6/2024
**Merged by:** [@tjbck](https://github.com/tjbck)
**Base:** `dev` ← **Head:** `feat/limit-title-gen-tokens`
---
### 📝 Commits (1)
- [`b8c97fa`](https://github.com/open-webui/open-webui/commit/b8c97fa0129c2869a5028b52e45f2e672575dc6d) feat: restrict title gen output to 50 tokens
### 📊 Changes
**2 files changed** (+8 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/apis/ollama/index.ts` (+5 -1)
📝 `src/lib/apis/openai/index.ts` (+3 -1)
</details>
### 📄 Description
## Pull Request Checklist
- [x] **Description:** Briefly describe the changes in this pull request.
- [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [ ] **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 the changes?
- [x] **Code Review:** Have you self-reviewed your code and addressed any coding standard issues?
---
## Description
Specify a max output tokens of 50 for both Ollama and OpenAI when generating titles, so even if the model goes off the rails and generates a large chunk of text, it doesn't cost more than 50 tokens.
---
<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/2001
Author: @cheahjs
Created: 5/6/2024
Status: ✅ Merged
Merged: 5/6/2024
Merged by: @tjbck
Base:
dev← Head:feat/limit-title-gen-tokens📝 Commits (1)
b8c97fafeat: restrict title gen output to 50 tokens📊 Changes
2 files changed (+8 additions, -2 deletions)
View changed files
📝
src/lib/apis/ollama/index.ts(+5 -1)📝
src/lib/apis/openai/index.ts(+3 -1)📄 Description
Pull Request Checklist
Description
Specify a max output tokens of 50 for both Ollama and OpenAI when generating titles, so even if the model goes off the rails and generates a large chunk of text, it doesn't cost more than 50 tokens.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.