add small model for title generation

This commit is contained in:
Dax Raad
2025-07-15 14:00:39 -04:00
parent 76e256ed64
commit b1ab641905
6 changed files with 16 additions and 22 deletions

View File

@@ -504,6 +504,7 @@ export namespace Session {
})
if (msgs.length === 0 && !session.parentID) {
const small = (await Provider.getSmallModel(input.providerID)) ?? model
generateText({
maxOutputTokens: input.providerID === "google" ? 1024 : 20,
providerOptions: model.info.options,
@@ -528,7 +529,7 @@ export namespace Session {
},
]),
],
model: model.language,
model: small.language,
})
.then((result) => {
if (result.text)
@@ -1012,6 +1013,7 @@ export namespace Session {
const processor = createProcessor(next, model.info)
const stream = streamText({
maxRetries: 10,
abortSignal: abort.signal,
model: model.language,
messages: [