Interface IAgentTemplateService
- Namespace
- FoundationaLLM.Common.Interfaces
- Assembly
- FoundationaLLM.Common.dll
Defines the contract for working with agent templates.
public interface IAgentTemplateService
- Extension Methods
Methods
CreateAgent(string, AgentCreationFromTemplateRequest, Dictionary<string, string>, UnifiedUserIdentity)
Creates a new agent based on the provided parameter values and template files.
Task<ResourceProviderUpsertResult> CreateAgent(string instanceId, AgentCreationFromTemplateRequest createAgentRequest, Dictionary<string, string> agentTemplateFiles, UnifiedUserIdentity userIdentity)
Parameters
instanceId
stringThe FoundationaLLM instance identifier.
createAgentRequest
AgentCreationFromTemplateRequestThe request object containing the parameter values for creating the agent.
agentTemplateFiles
Dictionary<string, string>A dictionary of template file names and their corresponding content, used to define the agent's structure and behavior.
userIdentity
UnifiedUserIdentityThe identity of the user requesting to create the agent.
Returns
- Task<ResourceProviderUpsertResult>
A task that represents the asynchronous operation. The task result contains a ResourceProviderUpsertResult indicating the outcome of the agent creation process.
Remarks
This method performs an asynchronous operation to create an agent based on the
provided parameter values and template files. Ensure that all required template files are included in
agentTemplateFiles
and that the createAgentRequest
contains valid
parameters.
SetResourceProviderServices(IEnumerable<IResourceProviderService>)
Sets the collection of resource providers to be used by the service.
void SetResourceProviderServices(IEnumerable<IResourceProviderService> resourceProviderServices)
Parameters
resourceProviderServices
IEnumerable<IResourceProviderService>A collection of resource provider services to register.
Remarks
Using this method is required to avoid circular references, since this service is a dependency for the FoundationaLLM.Agent resource provider while it also requires a refrence to the same resource provider.