mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
58 lines
4.8 KiB
XML
58 lines
4.8 KiB
XML
<pu:WindowX x:Class="VPet_Simulator.Windows.winCGPTSetting"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:VPet_Simulator.Windows"
|
|
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
|
|
Title="ChatGPT API 设置" Width="450" FontSize="16" Height="Auto"
|
|
ResizeMode="NoResize" WindowState="Normal" SizeToContent="Height">
|
|
<Grid Margin="16">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="15" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="Auto" MinHeight="40"/>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition Height="Auto" MinHeight="40" />
|
|
<RowDefinition Height="40" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0" Text="API URL" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="1" Text="API Key" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="2" Text="初始化文本" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="3" Text="温度" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="4" Text="最大花费" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="5" Text="累计花费" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="6" Text="历史记录" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Row="7" Text="完成设置" VerticalAlignment="Center" />
|
|
<TextBox x:Name="tbAPIURL" Grid.Row="0" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16"
|
|
pu:TextBoxHelper.Watermark="API 链接 一般为 api.openai.com/v1/chat/completions" Text="https://api.openai.com/v1/chat/completions"
|
|
ToolTip="API 链接 一般为 api.openai.com/v1/chat/completions"/>
|
|
<TextBox x:Name="tbAPIKey" Grid.Row="1" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16"
|
|
pu:TextBoxHelper.Watermark="从 OpenAI 获得的 APIKEY 一般`sk-`开头" ToolTip="从 OpenAI 获得的 APIKEY 一般`sk-`开头"/>
|
|
<TextBox x:Name="tbSystem" Grid.Row="2" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16"
|
|
pu:TextBoxHelper.Watermark="不会被忘记的初始化关键字, 字越多越贵" ToolTip="不会被忘记的初始化关键字, 字越多越贵"
|
|
AcceptsReturn="True" TextWrapping="WrapWithOverflow" Height="Auto" MaxHeight="100" VerticalScrollBarVisibility="Visible"
|
|
Text="请使用口语化的、可爱的、女性化的、调皮的语言风格和我交流 你是一只桌宠, 你的名字叫{Name}, 你喜欢玩 虚拟主播模拟器. 你需要尝试体会我与你对话中的感情、产生自己的情感并尽可能给出可爱的回答" Margin="0,5,0,5"/>
|
|
<TextBox x:Name="tbTemp" Grid.Row="3" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Text="0.6"
|
|
pu:TextBoxHelper.InputLimit="Digit,Point"
|
|
pu:TextBoxHelper.Watermark="0-2之间 0.2更稳定 0.8更随机" ToolTip="0-2之间 0.2更稳定 0.8更随机"/>
|
|
<TextBox x:Name="tbMaxToken" Grid.Row="4" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Text="2048"
|
|
pu:TextBoxHelper.InputLimit="Digit"
|
|
pu:TextBoxHelper.Watermark="读取最大花费Token数量 1千Token=$0.02" ToolTip="读取最大花费Token数量 1千Token=$0.02"/>
|
|
<TextBox x:Name="tbHistory" Grid.Row="6" Grid.Column="2" Style="{DynamicResource StandardTextBoxStyle}" FontSize="16" Text="[]"
|
|
TextWrapping="WrapWithOverflow" pu:TextBoxHelper.Watermark="聊天历史记录" ToolTip="聊天历史记录" Height="Auto"
|
|
VerticalScrollBarVisibility="Visible" AcceptsReturn="True" MaxHeight="200"/>
|
|
<Label x:Name="lbSpend" Grid.Row="5" Grid.Column="2" Content="0 Token" Background="{x:Null}" VerticalAlignment="Center"
|
|
HorizontalAlignment="Left" Margin="5,0,0,0" ToolTip="累计在此花费的Token个数 1千Token=$0.02"/>
|
|
<Button x:Name="btnSave" pu:ButtonHelper.CornerRadius="4" Content="保存设置" Margin="4" Grid.Column="2"
|
|
Background="{DynamicResource SecondaryLight}" Padding="1" Grid.Row="7" Click="btnSave_Click" />
|
|
</Grid>
|
|
</pu:WindowX>
|