Skip to content

Commit a3c8c12

Browse files
committed
temp
1 parent feb5d38 commit a3c8c12

14 files changed

+799
-664
lines changed

AIClient/Data/DialogPersistModel.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ public class DialogPersistModel
1313
public string? Model { get; set; }
1414

1515
public string? PromptString { get; set; }
16+
17+
18+
public string? SystemPrompt { get; set; }
1619

1720
public IModelParams? Params { get; set; }
1821

1922
public long TokensConsumption { get; set; }
2023

2124
public double TotalPrice { get; set; }
22-
25+
2326
public IAIFunctionGroup[]? Functions { get; set; }
2427
}

AIClient/Data/ProjectPersistModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
public class ProjectPersistModel
44
{
55
public const int CurrentVersion = 1;
6-
public int Version { get; set; }
6+
public int Version { get; set; } = CurrentVersion;
7+
8+
79
}

AIClient/UI/AutoMapModelTypeConverter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public DialogPersistModel Convert(DialogViewModel source, DialogPersistModel des
110110
TokensConsumption = source.TokensConsumption,
111111
TotalPrice = source.TotalPrice,
112112
Functions = source.SelectedFunctions?.ToArray(),
113+
SystemPrompt = source.SystemPrompt,
113114
};
114115
}
115116

@@ -155,6 +156,7 @@ public DialogViewModel Convert(DialogPersistModel source, DialogViewModel destin
155156

156157
return new DialogViewModel(source.Topic, llmModelClient, sourceDialogItems)
157158
{
159+
SystemPrompt = source.SystemPrompt,
158160
PromptString = source.PromptString,
159161
TokensConsumption = source.TokensConsumption,
160162
TotalPrice = source.TotalPrice,

AIClient/UI/DataTemplateDictionary.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
<Run
157157
Text="{Binding SelectedModel.Endpoint.DisplayName, StringFormat=服务:{0},TargetNullValue=未选择服务,Mode=OneWay}" />
158158
<Run
159-
Text="{Binding SelectedModel,StringFormat=模型:{0},TargetNullValue=未选择模型,Mode=OneWay}" />
159+
Text="{Binding SelectedModel.Name,StringFormat=模型:{0},TargetNullValue=未选择模型,Mode=OneWay}" />
160160
</TextBlock>
161161
<StackPanel Grid.Column="1"
162162
Margin="10,0,0,0"

0 commit comments

Comments
 (0)