File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1313 <Copyright >Avanade 2019</Copyright >
1414 <PackageProjectUrl >https://github.com/Avanade/Liquid-Application-Framework</PackageProjectUrl >
1515 <PackageIcon >logo.png</PackageIcon >
16- <Version >8.1.0 </Version >
16+ <Version >8.1.1 </Version >
1717 <GenerateDocumentationFile >true</GenerateDocumentationFile >
1818 <IsPackable >true</IsPackable >
1919 <DebugType >Full</DebugType >
3131 </ItemGroup >
3232
3333 <ItemGroup >
34- <PackageReference Include =" Azure.AI.OpenAI" Version =" 2.1.0" />
34+ <PackageReference Include =" Azure.AI.OpenAI" Version =" 2.1.0-beta.2 " />
3535 <PackageReference Include =" Liquid.Core" Version =" 8.1.0" />
3636 <PackageReference Include =" Microsoft.Extensions.Configuration.Binder" Version =" 8.0.2" />
3737 </ItemGroup >
Original file line number Diff line number Diff line change @@ -85,9 +85,7 @@ public async Task<ChatCompletionResult> CompleteChatAsync(LiquidChatMessages mes
8585
8686 messages . Messages . ForEach ( m => requestMessages . Add ( MapChatRequestMessage ( m ) ) ) ;
8787
88- var option = MapChatCompletionOptions ( settings ) ;
89-
90- var responseWithoutStream = await client . CompleteChatAsync ( requestMessages , option ) ;
88+ var option = MapChatCompletionOptions ( settings ) ;
9189
9290 if ( functions != null )
9391 {
@@ -102,7 +100,12 @@ public async Task<ChatCompletionResult> CompleteChatAsync(LiquidChatMessages mes
102100 }
103101 }
104102
105- var response = responseWithoutStream . Value . Content [ 0 ] . Text ;
103+ var responseWithoutStream = await client . CompleteChatAsync ( requestMessages , option ) ;
104+
105+
106+ var response = responseWithoutStream . Value . FinishReason != ChatFinishReason . ToolCalls ?
107+ responseWithoutStream . Value . Content [ 0 ] . Text :
108+ responseWithoutStream . Value . ToolCalls [ 0 ] . FunctionArguments . ToString ( ) ;
106109
107110 var result = new ChatCompletionResult ( )
108111 {
You can’t perform that action at this time.
0 commit comments