mirror of
https://github.com/open-webui/open-webui
synced 2025-02-22 13:18:25 +00:00
Merge pull request #2001 from cheahjs/feat/limit-title-gen-tokens
feat: restrict title gen output to 50 tokens
This commit is contained in:
commit
0334ab7c5d
@ -159,7 +159,11 @@ export const generateTitle = async (
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
model: model,
|
model: model,
|
||||||
prompt: template,
|
prompt: template,
|
||||||
stream: false
|
stream: false,
|
||||||
|
options: {
|
||||||
|
// Restrict the number of tokens generated to 50
|
||||||
|
num_predict: 50,
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
@ -295,7 +295,9 @@ export const generateTitle = async (
|
|||||||
content: template
|
content: template
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
stream: false
|
stream: false,
|
||||||
|
// Restricting the max tokens to 50 to avoid long titles
|
||||||
|
max_tokens: 50,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user