We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1e8c995 + db74f2c commit 9e9bc49Copy full SHA for 9e9bc49
core/src/browser/models/utils.ts
@@ -50,6 +50,22 @@ export const normalizeValue = (key: string, value: any) => {
50
// Convert to integer
51
return Math.floor(Number(value))
52
}
53
+ if (
54
+ key === 'temperature' ||
55
+ key === 'top_k' ||
56
+ key === 'top_p' ||
57
+ key === 'min_p' ||
58
+ key === 'repeat_penalty' ||
59
+ key === 'frequency_penalty' ||
60
+ key === 'presence_penalty' ||
61
+ key === 'repeat_last_n'
62
+ ) {
63
+ // Convert to float
64
+ const newValue = parseFloat(value)
65
+ if (newValue !== null && !isNaN(newValue)) {
66
+ return newValue
67
+ }
68
69
return value
70
71
0 commit comments