feat: add maxTokens option to newChatStore
This commit is contained in:
@@ -205,7 +205,7 @@ class Chat {
|
||||
this.top_p = top_p;
|
||||
this.enable_top_p = enable_top_p;
|
||||
this.presence_penalty = presence_penalty;
|
||||
this.presence_penalty_enabled = presence_penalty_enabled
|
||||
this.presence_penalty_enabled = presence_penalty_enabled;
|
||||
this.frequency_penalty = frequency_penalty;
|
||||
this.frequency_penalty_enabled = frequency_penalty_enabled;
|
||||
this.json_mode = json_mode;
|
||||
|
||||
@@ -35,6 +35,7 @@ interface NewChatStoreOptions {
|
||||
image_gen_key?: string;
|
||||
json_mode?: boolean;
|
||||
logprobs?: boolean;
|
||||
maxTokens?: number;
|
||||
}
|
||||
|
||||
export const newChatStore = (options: NewChatStoreOptions): ChatStore => {
|
||||
@@ -52,7 +53,9 @@ export const newChatStore = (options: NewChatStoreOptions): ChatStore => {
|
||||
maxTokens: getDefaultParams(
|
||||
"max",
|
||||
models[getDefaultParams("model", options.model ?? DefaultModel)]
|
||||
?.maxToken ?? 2048
|
||||
?.maxToken ??
|
||||
options.maxTokens ??
|
||||
2048
|
||||
),
|
||||
maxGenTokens: 2048,
|
||||
maxGenTokens_enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user