@@ -39,12 +39,12 @@ public async Task ChatAsyncTest()
39
39
40
40
Assert . IsNotNull ( result ) ;
41
41
//await Console.Out.WriteLineAsync(result.ToJson(true));
42
- Assert . IsTrue ( result . Output . Length > 0 ) ;
42
+ Assert . IsTrue ( result . OutputString . Length > 0 ) ;
43
43
Assert . IsTrue ( result . LastException == null ) ;
44
44
45
45
( ( SenparcAiArguments ) result . InputContext ) . KernelArguments . TryGetValue ( "human_input" , out var question ) ;
46
46
await Console . Out . WriteLineAsync ( "Q: " + question ) ;
47
- await Console . Out . WriteLineAsync ( "A: " + result . Output ) ;
47
+ await Console . Out . WriteLineAsync ( "A: " + result . OutputString ) ;
48
48
await Console . Out . WriteLineAsync ( ) ;
49
49
50
50
//第二轮对话
@@ -55,7 +55,7 @@ public async Task ChatAsyncTest()
55
55
56
56
( ( SenparcAiArguments ) result . InputContext ) . KernelArguments . TryGetValue ( "human_input" , out var question2 ) ;
57
57
await Console . Out . WriteLineAsync ( "Q: " + question2 ) ;
58
- await Console . Out . WriteLineAsync ( "A: " + result . Output ) ;
58
+ await Console . Out . WriteLineAsync ( "A: " + result . OutputString ) ;
59
59
await Console . Out . WriteLineAsync ( ) ;
60
60
61
61
//第三轮对话
@@ -66,7 +66,7 @@ public async Task ChatAsyncTest()
66
66
67
67
( ( SenparcAiArguments ) result . InputContext ) . KernelArguments . TryGetValue ( "human_input" , out var question3 ) ;
68
68
await Console . Out . WriteLineAsync ( "Q: " + question3 ) ;
69
- await Console . Out . WriteLineAsync ( "A: " + result . Output ) ;
69
+ await Console . Out . WriteLineAsync ( "A: " + result . OutputString ) ;
70
70
await Console . Out . WriteLineAsync ( ) ;
71
71
72
72
//第四轮对话
@@ -76,7 +76,7 @@ public async Task ChatAsyncTest()
76
76
await Console . Out . WriteLineAsync ( $ "第四轮对话(耗时:{ SystemTime . DiffTotalMS ( dt ) } ms)") ;
77
77
( ( SenparcAiArguments ) result . InputContext ) . KernelArguments . TryGetValue ( "human_input" , out var question4 ) ;
78
78
await Console . Out . WriteLineAsync ( "Q: " + question4 ) ;
79
- await Console . Out . WriteLineAsync ( "A: " + result . Output ) ;
79
+ await Console . Out . WriteLineAsync ( "A: " + result . OutputString ) ;
80
80
}
81
81
82
82
[ TestMethod ]
@@ -120,15 +120,15 @@ public async Task ReadMeDemoTest()
120
120
aiRequest . SetStoredContext ( "history" , history + $ "\n Human: { prompt } \n Bot: { aiRequest . RequestContent } ") ;
121
121
122
122
//aiResult.Result 结果:中国的人口约为13.8亿。
123
- await Console . Out . WriteLineAsync ( aiResult . Output ) ;
123
+ await Console . Out . WriteLineAsync ( aiResult . OutputString ) ;
124
124
//await Console.Out.WriteLineAsync(aiResult.ToJson(true));
125
125
126
126
//第二次对话,包含上下文,自动理解提问目标是人口数量
127
127
aiRequest . SetStoredContext ( "human_input" , "那美国呢" ) ;
128
128
129
129
aiResult = await iWantToRun . RunAsync ( aiRequest ) ;
130
130
//aiResult.Result 结果:美国的人口大约为3.2亿。
131
- await Console . Out . WriteLineAsync ( aiResult . Output ) ;
131
+ await Console . Out . WriteLineAsync ( aiResult . OutputString ) ;
132
132
}
133
133
134
134
[ TestMethod ]
@@ -163,7 +163,7 @@ public async Task PureFunctionTextCompletionTest1()
163
163
//await Console.Out.WriteLineAsync(Senparc.AI.Config.SenparcAiSetting.ToJson(true));
164
164
165
165
Assert . IsNotNull ( result ) ;
166
- await Console . Out . WriteLineAsync ( result . Output ) ;
166
+ await Console . Out . WriteLineAsync ( result . OutputString ) ;
167
167
}
168
168
169
169
[ TestMethod ]
@@ -215,8 +215,8 @@ 5. 直接输出结果,不需要输出任何其他文字。
215
215
//await Console.Out.WriteLineAsync(Senparc.AI.Config.SenparcAiSetting.ToJson(true));
216
216
217
217
Assert . IsNotNull ( result ) ;
218
- await Console . Out . WriteLineAsync ( result . Output ) ;
219
- Assert . AreEqual ( "Helloworld!Thisisanewworld." , result . Output ) ;
218
+ await Console . Out . WriteLineAsync ( result . OutputString ) ;
219
+ Assert . AreEqual ( "Helloworld!Thisisanewworld." , result . OutputString ) ;
220
220
}
221
221
222
222
[ TestMethod ( ) ]
0 commit comments