Azure.AI.OpenAI v1.0.0-beta.17
This commit is contained in:
parent
c01b21baa9
commit
1eb8631476
|
|
@ -11,7 +11,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.16" />
|
||||
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.17" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
}));
|
||||
prompt += $"{verbose}\r\n";
|
||||
|
||||
prompt += "\r\n[CONVERSATION]";
|
||||
verbose = string.Join("\r\n", chatCompletionsOptions.Messages
|
||||
.Where(x => x.Role != AgentRole.System).Select(x =>
|
||||
{
|
||||
|
|
@ -364,13 +365,14 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
prompt += $"\r\n{verbose}\r\n";
|
||||
}
|
||||
|
||||
if (chatCompletionsOptions.Functions.Count > 0)
|
||||
if (chatCompletionsOptions.Tools.Count > 0)
|
||||
{
|
||||
var functions = string.Join("\r\n", chatCompletionsOptions.Functions.Select(x =>
|
||||
var functions = string.Join("\r\n", chatCompletionsOptions.Tools.Select(x =>
|
||||
{
|
||||
return $"\r\n{x.Name}: {x.Description}\r\n{x.Parameters}";
|
||||
var fn = x as ChatCompletionsFunctionToolDefinition;
|
||||
return $"\r\n{fn.Name}: {fn.Description}\r\n{fn.Parameters}";
|
||||
}));
|
||||
prompt += $"\r\n[FUNCTIONS]\r\n{functions}\r\n";
|
||||
prompt += $"\r\n[FUNCTIONS]{functions}\r\n";
|
||||
}
|
||||
|
||||
return prompt;
|
||||
|
|
|
|||
Loading…
Reference in a new issue