Skip to content

Commit

Permalink
Set ranges to be order of [min, default, max]
Browse files Browse the repository at this point in the history
  • Loading branch information
rhys101 committed Oct 29, 2024
1 parent 7d810fc commit c7fd2f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/extension/background/APIHandler/APIHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class APIHelper {
temperature: manifest.config.temperature,
repeatPenalty: manifest.config.repeatPenalty,
flashAttention: manifest.config.flashAttention,
contextSize: [1, manifest.tokens.max, manifest.tokens.default]
contextSize: [1, manifest.tokens.default, manifest.tokens.max]
}
} else {
return { available }
Expand Down
20 changes: 10 additions & 10 deletions src/extension/contentscript-main/AIRootModelCapabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ class AIRootModelCapabilities {
get available () { return this.#data.available }
get gpuEngines () { return this.#data.gpuEngines }

get defaultTopK () { return this.#data.topK?.[2] ?? null }
get maxTopK () { return this.#data.topK?.[1] ?? null }
get defaultTopK () { return this.#data.topK?.[1] ?? null }
get maxTopK () { return this.#data.topK?.[2] ?? null }

get defaultTopP () { return this.#data.topP?.[2] ?? null }
get maxTopP () { return this.#data.topP?.[1] ?? null }
get defaultTopP () { return this.#data.topP?.[1] ?? null }
get maxTopP () { return this.#data.topP?.[2] ?? null }

get defaultTemperature () { return this.#data.temperature?.[2] ?? null }
get maxTemperature () { return this.#data.temperature?.[1] ?? null }
get defaultTemperature () { return this.#data.temperature?.[1] ?? null }
get maxTemperature () { return this.#data.temperature?.[2] ?? null }

get defaultRepeatPenalty () { return this.#data.repeatPenalty?.[2] ?? null }
get maxRepeatPenalty () { return this.#data.repeatPenalty?.[1] ?? null }
get defaultRepeatPenalty () { return this.#data.repeatPenalty?.[1] ?? null }
get maxRepeatPenalty () { return this.#data.repeatPenalty?.[2] ?? null }

get defaultFlashAttention () { return this.#data.flashAttention ?? null }

get defaultContextSize () { return this.#data.contextSize?.[2] ?? null }
get maxContextSize () { return this.#data.contextSize?.[1] ?? null }
get defaultContextSize () { return this.#data.contextSize?.[1] ?? null }
get maxContextSize () { return this.#data.contextSize?.[2] ?? null }

/* **************************************************************************/
// MARK: Getters
Expand Down

0 comments on commit c7fd2f0

Please sign in to comment.