Fix GetAgents list.
This commit is contained in:
parent
758cfd556e
commit
7fb9440011
|
|
@ -7,7 +7,7 @@ public interface IAgentService
|
|||
{
|
||||
Task<Agent> CreateAgent(Agent agent);
|
||||
Task RefreshAgents();
|
||||
Task<List<Agent>> GetAgents();
|
||||
Task<List<Agent>> GetAgents(bool? allowRouting = null);
|
||||
|
||||
/// <summary>
|
||||
/// Load agent configurations and trigger hooks
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ public partial class AgentService
|
|||
#if !DEBUG
|
||||
[MemoryCache(10 * 60)]
|
||||
#endif
|
||||
public async Task<List<Agent>> GetAgents()
|
||||
public async Task<List<Agent>> GetAgents(bool? allowRouting = null)
|
||||
{
|
||||
var agents = _db.GetAgentsByUser(_user.Id);
|
||||
var agents = _db.GetAgents(allowRouting: allowRouting);
|
||||
return await Task.FromResult(agents);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ public partial class RoutingService
|
|||
private void FixMalformedResponse(FunctionCallFromLlm args)
|
||||
{
|
||||
var agentService = _services.GetRequiredService<IAgentService>();
|
||||
var agents = agentService.GetAgents().Result;
|
||||
var agents = agentService.GetAgents(allowRouting: true).Result;
|
||||
var malformed = false;
|
||||
|
||||
// Sometimes it populate malformed Function in Agent name
|
||||
|
|
|
|||
Loading…
Reference in a new issue