mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #1539] [MERGED] feat: add {{prompt:start:length}} and {{prompt:end:length}} to title gen #7495
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/1539
Author: @cheahjs
Created: 4/13/2024
Status: ✅ Merged
Merged: 4/14/2024
Merged by: @tjbck
Base:
dev← Head:feat/customizable-title-prompt-length📝 Commits (4)
db817fcfeat: add {{prompt:start:length}} and {{prompt:end:length}} to title genfffd42efix: replace all instances of prompt:start and prompt:enda938ffbMerge branch 'dev' into feat/customizable-title-prompt-length0c441b5refac: naming convention📊 Changes
3 files changed (+31 additions, -2 deletions)
View changed files
📝
src/lib/apis/ollama/index.ts(+2 -1)📝
src/lib/apis/openai/index.ts(+2 -1)📝
src/lib/utils/index.ts(+27 -0)📄 Description
Pull Request Checklist
Description
Adds support for specifying a subset of the start and end of prompt for title generation. For example, the following title generation prompt uses the first and last 4096 characters of the prompt:
Rationale for this is when using models with mismatched context windows, which breaks when the shorter window model is used for generating the title. For example, in my use case, I'm using Gemini 1.5 Pro as the main model, and using the cheaper Claude 3 Haiku model for title generation, but any chats exceeding Claude's context window would fail. This makes the assumption that most instructions relevant to title generation will be either at the start or end of the prompt.
Changelog Entry
Added
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.