Interface IPromptManagementClient
- Namespace
- FoundationaLLM.Client.Management.Interfaces
- Assembly
- FoundationaLLM.Client.Management.dll
Provides methods to manage prompt resources.
public interface IPromptManagementClient
- Extension Methods
Methods
CheckPromptNameAsync(ResourceName)
Checks the availability of a resource name for a prompt. If the name is available, the Status value will be "Allowed". If the name is not available, the Status value will be "Denied" and the Message will explain the reason why. Typically, a denied name is due to a name conflict with an existing prompt or a prompt that was deleted but not purged.
Task<ResourceNameCheckResult> CheckPromptNameAsync(ResourceName resourceName)
Parameters
resourceName
ResourceNameContains the name of the resource to check.
Returns
Exceptions
- ArgumentException
Thrown when the required properties within the argument are empty or missing.
DeletePromptAsync(string)
Deletes a prompt resource by name. Please note that all deletes are soft deletes. The resource will be marked as deleted but not purged. To permanently remove a resource, execute the PurgePromptAsync(string) method with the same name.
Task DeletePromptAsync(string promptName)
Parameters
promptName
stringThe name of the prompt resource to delete.
Returns
GetPromptAsync(string)
Retrieves a specific prompt by name.
Task<ResourceProviderGetResult<PromptBase>> GetPromptAsync(string promptName)
Parameters
promptName
stringThe name of the prompt resource to retrieve.
Returns
GetPromptsAsync()
Retrieves all prompt resources.
Task<List<ResourceProviderGetResult<PromptBase>>> GetPromptsAsync()
Returns
- Task<List<ResourceProviderGetResult<PromptBase>>>
All prompt resources to which the caller has access and which have not been marked as deleted.
PurgePromptAsync(string)
Purges a deleted prompt by its name. This action is irreversible.
Task<ResourceProviderActionResult> PurgePromptAsync(string promptName)
Parameters
promptName
stringThe name of the prompt to purge.
Returns
UpsertPromptAsync(PromptBase)
Upserts a prompt resource. If a prompt does not exist, it will be created. If a prompt does exist, it will be updated.
Task<ResourceProviderUpsertResult> UpsertPromptAsync(PromptBase prompt)
Parameters
prompt
PromptBaseThe prompt resource to create or update.
Returns
- Task<ResourceProviderUpsertResult>
Returns a ResourceProviderUpsertResult, which contains the Object ID of the resource.