| 1 | import { InputDescriptor } from "./providers"; |
| 2 | |
| 3 | export const completionParamsInputs: Record<string, InputDescriptor> = { |
| 4 | contextLength: { |
| 5 | inputType: "number", |
| 6 | key: "contextLength", |
| 7 | label: "Context Length", |
| 8 | defaultValue: undefined, |
| 9 | required: false, |
| 10 | }, |
| 11 | temperature: { |
| 12 | inputType: "number", |
| 13 | key: "completionOptions.temperature", |
| 14 | label: "Temperature", |
| 15 | defaultValue: undefined, |
| 16 | required: false, |
| 17 | min: 0.0, |
| 18 | max: 1.0, |
| 19 | step: 0.01, |
| 20 | }, |
| 21 | topP: { |
| 22 | inputType: "number", |
| 23 | key: "completionOptions.topP", |
| 24 | label: "Top-P", |
| 25 | defaultValue: undefined, |
| 26 | required: false, |
| 27 | min: 0, |
| 28 | max: 1, |
| 29 | step: 0.01, |
| 30 | }, |
| 31 | topK: { |
| 32 | inputType: "number", |
| 33 | key: "completionOptions.topK", |
| 34 | label: "Top-K", |
| 35 | defaultValue: undefined, |
| 36 | required: false, |
| 37 | min: 0, |
| 38 | step: 1, |
| 39 | }, |
| 40 | presencePenalty: { |
| 41 | inputType: "number", |
| 42 | key: "completionOptions.presencePenalty", |
| 43 | label: "Presence Penalty", |
| 44 | defaultValue: undefined, |
| 45 | required: false, |
| 46 | min: 0, |
| 47 | max: 1, |
| 48 | step: 0.01, |
| 49 | }, |
| 50 | frequencyPenalty: { |
| 51 | inputType: "number", |
| 52 | key: "completionOptions.frequencyPenalty", |
| 53 | label: "Frequency Penalty", |
| 54 | defaultValue: undefined, |
| 55 | required: false, |
| 56 | min: 0, |
| 57 | max: 1, |
| 58 | step: 0.01, |
| 59 | }, |
| 60 | }; |