Files
BeWoPlaner/BeWo/View/Detail/AI/AiConfigView.xaml

112 lines
5.4 KiB
XML

<UserControl
x:Class="BeWo.View.Detail.AI.AiConfigView"
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:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
xmlns:local="clr-namespace:BeWo.View.Detail.AI"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
xmlns:vmv="clr-namespace:BeWo.ViewModel.View"
d:DataContext="{d:DesignInstance Type=vmv:AiConversationChatViewModel,
IsDesignTimeCreatable=True}"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Slider}">
<Setter Property="Margin" Value="3" />
<Setter Property="Height" Value="30" />
<Setter Property="Minimum" Value="0" />
<Setter Property="Maximum" Value="1" />
<Setter Property="SmallChange" Value="0.01" />
<Setter Property="IsMoveToPointEnabled" Value="True" />
</Style>
<Style BasedOn="{StaticResource PopupWhiteLabel}" TargetType="{x:Type Label}" />
</ResourceDictionary>
</UserControl.Resources>
<GroupBox Style="{StaticResource ObjectEditGroupBox}">
<GroupBox.Header>
KI Module Einstellungen
</GroupBox.Header>
<Grid Margin="16" HorizontalAlignment="Stretch">
<!--<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" SharedSizeGroup="ai1" />
<ColumnDefinition Width="100*" MaxWidth="600" />
<ColumnDefinition Width="*" SharedSizeGroup="ai1" />
</Grid.ColumnDefinitions>-->
<Grid Grid.Column="1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MinWidth="100" />
<ColumnDefinition Width="5" />
<ColumnDefinition Width="200" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label>
Ausgewähltes Modell
</Label>
<ComboBox
Grid.Column="2"
ItemsSource="{Binding Models}"
SelectedItem="{Binding Config.SelectedModel}" />
<Label Grid.Row="1" IsEnabled="False">
Temperatur
</Label>
<Slider
Grid.Row="1"
Grid.Column="2"
IsEnabled="False"
Value="{Binding Config.Temperature}" />
<Label Grid.Row="2" IsEnabled="False">
top__p
</Label>
<Slider
Grid.Row="2"
Grid.Column="2"
IsEnabled="False"
Value="{Binding Config.Top_P}" />
<Label Grid.Row="3" IsEnabled="False">
max__gen__len
</Label>
<dxe:TextEdit
Grid.Row="3"
Grid.Column="2"
EditValue="{Binding Config.Max_Gen_Len}"
IsEnabled="False"
Style="{StaticResource TextEditNumber}" />
<Label Grid.Row="4" VerticalAlignment="Top">
Datenformat
</Label>
<StackPanel Grid.Row="4" Grid.Column="2">
<StackPanel Orientation="Horizontal">
<RadioButton IsChecked="{Binding Config.Context_Type, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiDataContextType.json}}">json</RadioButton>
<RadioButton IsChecked="{Binding Config.Context_Type, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiDataContextType.csv}}">csv</RadioButton>
<RadioButton IsChecked="{Binding Config.Context_Type, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiDataContextType.tsv}}">tsv</RadioButton>
</StackPanel>
<StackPanel Orientation="Horizontal">
<RadioButton IsChecked="{Binding Config.Context_Type, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiDataContextType.csv2}}">csv2</RadioButton>
<RadioButton IsChecked="{Binding Config.Context_Type, Converter={StaticResource ComparisonConverter}, ConverterParameter={x:Static shared:AiDataContextType.tsv2}}">tsv2</RadioButton>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</GroupBox>
</UserControl>