Table of Contents

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 ResourceName

Contains the name of the resource to check.

Returns

Task<ResourceNameCheckResult>

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 string

The name of the prompt resource to delete.

Returns

Task

GetPromptAsync(string)

Retrieves a specific prompt by name.

Task<ResourceProviderGetResult<PromptBase>> GetPromptAsync(string promptName)

Parameters

promptName string

The name of the prompt resource to retrieve.

Returns

Task<ResourceProviderGetResult<PromptBase>>

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 string

The name of the prompt to purge.

Returns

Task<ResourceProviderActionResult>

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 PromptBase

The prompt resource to create or update.

Returns

Task<ResourceProviderUpsertResult>

Returns a ResourceProviderUpsertResult, which contains the Object ID of the resource.