Skip to content

Commit

Permalink
Merge pull request #1370 from solliancenet/kb-agent-capabilities-cher…
Browse files Browse the repository at this point in the history
…ry-pick-080

Adding capabilities property to agent
  • Loading branch information
ciprianjichici authored Aug 8, 2024
2 parents a8cf5b0 + 396fbbb commit eaf9197
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ private async Task<ResourceProviderUpsertResult> UpdateAgent(ResourcePath resour
};

agent.ObjectId = resourcePath.GetObjectId(_instanceSettings.Id, _name);
agent.Capabilities ??= [AgentCapabilities.OpenAIAssistants];

if ((agent is KnowledgeManagementAgent {Vectorization.DedicatedPipeline: true, InlineContext: false} kmAgent))
{
Expand Down
6 changes: 6 additions & 0 deletions src/dotnet/Common/Models/ResourceProviders/Agent/AgentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ public class AgentBase : ResourceBase
[JsonPropertyName("long_running")]
public bool LongRunning { get; set; } = false;

/// <summary>
/// List of capabilities that the agent supports.
/// </summary>
[JsonPropertyName("capabilities")]
public string[]? Capabilities { get; set; }

/// <summary>
/// The object type of the agent.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace FoundationaLLM.Common.Models.ResourceProviders.Agent
{
/// <summary>
/// Contains constants for the capabilities of agents.
/// </summary>
public static class AgentCapabilities
{
/// <summary>
/// Indicated the agent supports the OpenAI Assistants API capability.
/// </summary>
public const string OpenAIAssistants = "OpenAIAssistants";
}
}

0 comments on commit eaf9197

Please sign in to comment.