2026-08-15 11:20:36 +02:00
|
|
|
namespace AIStudio.Tools.PluginSystem;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Represents a configuration object whose API key is managed by the user, although the object
|
|
|
|
|
/// itself is managed by a configuration plugin. Implemented by all provider kinds which support
|
2026-10-19 09:12:12 +02:00
|
|
|
/// the options "AllowUserProvidedAPIKey" and "PromptForUserAPIKey", i.e., LLM, embedding, and
|
|
|
|
|
/// transcription providers. UserProvidedAPIKeyOptions reads both options from a plugin.
|
2026-08-15 11:20:36 +02:00
|
|
|
/// </summary>
|
|
|
|
|
public interface IUserProvidedAPIKey
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// When set by a configuration plugin, the user may set their own API key for this otherwise
|
|
|
|
|
/// locked, enterprise-managed object.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AllowUserProvidedAPIKey { get; }
|
2026-10-19 09:12:12 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// When set by a configuration plugin, AI Studio asks the user for the API key of this object
|
|
|
|
|
/// on the home page as long as none is stored. Implies AllowUserProvidedAPIKey.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool PromptForUserAPIKey { get; }
|
2026-08-15 11:20:36 +02:00
|
|
|
}
|