Skip to content

Commit

Permalink
Update ChatSettingsView.axaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Mar 24, 2023
1 parent 79c9da1 commit 53185c0
Showing 1 changed file with 37 additions and 28 deletions.
65 changes: 37 additions & 28 deletions ChatGPT.UI/Views/Chat/ChatSettingsView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,123 +21,132 @@
<!-- Temperature -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Temperature:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<NumericUpDown Value="{Binding Temperature}"
Minimum="0"
Maximum="2"
Increment="0.1"
Margin="0"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive." />
</StackPanel>
<!-- MaxTokens -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Max tokens:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<NumericUpDown Value="{Binding MaxTokens}"
Minimum="0"
Maximum="32000"
Maximum="4000"
Increment="100"
Margin="4"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="The maximum number of tokens to generate. Requests can use up to 2,048 or 4,000 tokens shared between prompt and completion. The exact limit varies by model. (One token is roughly 4 characters for normal English text)" />
</StackPanel>
<!-- TopP -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Top P:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<NumericUpDown Value="{Binding TopP}"
Minimum="0"
Maximum="1"
Increment="0.01"
Margin="0"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered." />
</StackPanel>
<!-- FrequencyPenalty -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Frequency penalty:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<NumericUpDown Value="{Binding FrequencyPenalty}"
Minimum="0"
Maximum="2"
Increment="0.01"
Margin="0"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="How much to penalize new tokens based on their existing frequency in the text so far. Decreases the model's likelihood to repeat the same line verbatim." />
</StackPanel>
<!-- PresencePenalty -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Presence penalty:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<NumericUpDown Value="{Binding PresencePenalty}"
Minimum="0"
Maximum="2"
Increment="0.01"
Margin="0"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="How much to penalize new tokens based on whether they appear in the text so far. Increases the model's likelihood to talk about new topics." />
</StackPanel>
<!-- Directions -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Directions:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<TextBox Text="{Binding Directions}"
Watermark="Chat prompt initial system directions"
TextWrapping="Wrap"
AcceptsReturn="True"
Margin="4"
Margin="8,0,8,0"
Padding="8"
MaxHeight="188"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="The system message (directions) helps set the behavior of the assistant. Typically, a conversation is formatted with a system message first, followed by alternating user and assistant messages." />
</StackPanel>
<!-- Model -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Model:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<TextBox Text="{Binding Model}"
Margin="4"
Margin="8,4,8,4"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}"/>
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="" />
</StackPanel>
<!-- ApiKey -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Api key:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<TextBox Text="{Binding ApiKey}"
Watermark="Override OpenAI api key"
PasswordChar="*"
Margin="4"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}" />
FontSize="{DynamicResource SettingContentFontSize}"
ToolTip.Tip="Override OpenAI api key. By default OPENAI_API_KEY environment variable is used." />
</StackPanel>
<!-- Format -->
<StackPanel Orientation="Vertical">
<TextBlock Text="Format:"
Margin="4"
Margin="8,2,8,2"
Padding="0,4,0,4"
FontSize="{DynamicResource SettingHeaderFontSize}" />
<ComboBox SelectedItem="{Binding Format}"
Margin="4"
Margin="8,0,8,0"
Padding="8"
FontSize="{DynamicResource SettingContentFontSize}"
HorizontalAlignment="Stretch">
HorizontalAlignment="Stretch"
ToolTip.Tip="Format used to display new messages." >
<ComboBox.Items>
<generic:List x:TypeArguments="x:String">
<x:String>Text</x:String>
Expand Down

0 comments on commit 53185c0

Please sign in to comment.