Skip to content

Commit

Permalink
minor touch ups
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansampson committed Jan 13, 2025
1 parent ffbe76b commit ff4bc59
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class ModelConfigUI extends ModelConfigUIBase {
}

onContextSizeChange_(e: any) {
this.contextSize = parseInt(e.value, 10);
this.contextSize = e.valueAsNumber
}

onModelServerEndpointChange_(e: any) {
Expand All @@ -190,13 +190,13 @@ export class ModelConfigUI extends ModelConfigUIBase {
}

constructTokenEstimateString_(e?: any) {
let charsLength = 0;
let tokensLength = 0;
let charsLength = 0
let tokensLength = 0

if (e?.value) {
charsLength = e.value.length;
charsLength = e.value.length
} else if (this.modelSystemPrompt) {
charsLength = this.modelSystemPrompt.length;
charsLength = this.modelSystemPrompt.length
}

tokensLength = charsLength > 0 ? Math.ceil(charsLength/4) : 0;
Expand Down

0 comments on commit ff4bc59

Please sign in to comment.