|
1 | 1 | @using System.Linq |
2 | 2 |
|
3 | 3 | <FluentLayout Id="@Id"> |
| 4 | + |
| 5 | + @* Past Messages Slider *@ |
4 | 6 | <LabelWithTooltip Id="slider-past-messages" |
5 | 7 | LabelText="Past messages included" |
6 | 8 | TooltipText="Select the number of past messages to include in each new API request. This helps give the model context for new user queries. Setting this number to 10 will include 5 user queries and 5 system responses." |
7 | 9 | Style="padding-left:10px;font-weight:bold" /> |
8 | 10 |
|
9 | 11 | <SliderWithTextfield Min="1" Max="20" Step="1" @bind-Value=@pastMessagesValue Style="padding-left:5px;padding-right:10px;" /> |
10 | 12 |
|
| 13 | + @* Max Response Slider *@ |
11 | 14 | <LabelWithTooltip Id="slider-max-response" |
12 | 15 | LabelText="Max response" |
13 | 16 | TooltipText="Set a limit on the number of tokens per model response. The API supports a maximum of MaxTokensPlaceholderDoNotTranslate tokens shared between the prompt (including system message, examples, message history, and user query) and the model's response. One token is roughly 4 characters for typical English text." |
14 | 17 | Style="padding-left:10px;font-weight:bold" /> |
| 18 | + |
15 | 19 | <SliderWithTextfield Min="1" Max="16000" Step="1" @bind-Value=@maxResponseValue Style="padding-left:5px;padding-right:10px;" /> |
16 | 20 |
|
| 21 | + @* Temperature Slider *@ |
17 | 22 | <LabelWithTooltip Id="slider-temperature" |
18 | 23 | LabelText="Temperature" |
19 | 24 | TooltipText="Controls randomness. Lowering the temperature means that the model will produce more repetitive and deterministic responses. Increasing the temperature will result in more unexpected or creative responses. Try adjusting temperature or Top P but not both." |
20 | 25 | Style="padding-left:10px;font-weight:bold" /> |
| 26 | + |
21 | 27 | <SliderWithTextfield Min="0" Max="1" Step="0.01" @bind-Value=@temperatureValue Style="padding-left:5px;padding-right:10px;" /> |
22 | 28 |
|
| 29 | + @* Top P Slider *@ |
23 | 30 | <LabelWithTooltip Id="slider-top-p" |
24 | 31 | LabelText="Top P" |
25 | 32 | TooltipText="Similar to temperature, this controls randomness but uses a different method. Lowering Top P will narrow the model’s token selection to likelier tokens. Increasing Top P will let the model choose from tokens with both high and low likelihood. Try adjusting temperature or Top P but not both." |
26 | 33 | Style="padding-left:10px;font-weight:bold" /> |
27 | 34 | <SliderWithTextfield Min="0" Max="1" Step="0.01" @bind-Value=@topPValue Style="padding-left:5px;padding-right:10px;" /> |
28 | 35 |
|
| 36 | + @* Stop Sequence Auto Complete *@ |
29 | 37 | <LabelWithTooltip Id="complete-stop-sequence" |
30 | 38 | LabelText="Stop sequence" |
31 | 39 | TooltipText="Make the model end its response at a desired point. The model response will end before the specified sequence, so it won't contain the stop sequence text. For ChatGPT, using <|im_end|> ensures that the model response doesn't generate a follow-up user query. You can include as many as four stop sequences." |
|
43 | 51 | </OptionTemplate> |
44 | 52 | </FluentAutocomplete> |
45 | 53 |
|
| 54 | + @* Frequency Penalty Slider *@ |
46 | 55 | <LabelWithTooltip Id="slider-frequency-penalty" |
47 | 56 | LabelText="Frequency penalty" |
48 | 57 | TooltipText="Reduce the chance of repeating a token proportionally based on how often it has appeared in the text so far. This decreases the likelihood of repeating the exact same text in a response." |
49 | 58 | Style="padding-left:10px;font-weight:bold" /> |
| 59 | + |
50 | 60 | <SliderWithTextfield Min="0" Max="2" Step="0.01" @bind-Value=@frequencyPenaltyValue Style="padding-left:5px;padding-right:10px;" /> |
51 | 61 |
|
| 62 | + @* Presence Penalty Slider *@ |
52 | 63 | <LabelWithTooltip Id="slider-presence-penalty" |
53 | 64 | LabelText="Presence penalty" |
54 | 65 | TooltipText="Reduce the chance of repeating any token that has appeared in the text at all so far. This increases the likelihood of introducing new topics in a response." |
55 | 66 | Style="padding-left:10px;font-weight:bold" /> |
| 67 | + |
56 | 68 | <SliderWithTextfield Min="0" Max="2" Step="0.01" @bind-Value=@presencePenaltyValue Style="padding-left:5px;padding-right:10px;" /> |
| 69 | + |
57 | 70 | </FluentLayout> |
58 | 71 |
|
59 | 72 | @code { |
|
0 commit comments