Release v0.14.9.

This commit is contained in:
Haiping Chen 2023-09-25 18:18:09 -05:00
parent f0d8a74327
commit 3b00d2309c
3 changed files with 14 additions and 4 deletions

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<OutputPath>..\..\..\packages</OutputPath>
<BotSharpVersion>0.14.8</BotSharpVersion>
<BotSharpVersion>0.14.9</BotSharpVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
</Project>

View file

@ -56,7 +56,7 @@
<PackageReference Include="Colorful.Console" Version="1.2.15" />
<PackageReference Include="EntityFrameworkCore.BootKit" Version="6.2.1" />
<PackageReference Include="Fluid.Core" Version="2.4.0" />
<PackageReference Include="TensorFlow.Keras" Version="0.11.3" />
<PackageReference Include="TensorFlow.Keras" Version="0.11.4" />
</ItemGroup>
<ItemGroup>

View file

@ -65,10 +65,20 @@ public abstract class RoutingHandlerBase
args = JsonSerializer.Deserialize<FunctionCallFromLlm>(response.Content);
// Sometimes it populate malformed Function in Agent name
if (args.Function == args.AgentName)
if (!string.IsNullOrEmpty(args.Function) && args.Function == args.AgentName)
{
args.Function = "route_to_agent";
_logger.LogWarning($"Captured LLM response ");
_logger.LogWarning($"Captured LLM malformed response");
}
// Another case of malformed response
var agentService = _services.GetRequiredService<IAgentService>();
var agents = await agentService.GetAgents();
if (string.IsNullOrEmpty(args.AgentName) && agents.Select(x => x.Name).Contains(args.Function))
{
args.AgentName = args.Function;
args.Function = "route_to_agent";
_logger.LogWarning($"Captured LLM malformed response");
}
}
catch (Exception ex)