类 CredentialBase

java.lang.Object
io.agentscope.core.credential.CredentialBase
直接已知子类:
DeepSeekCredential, KimiCredential, XAICredential

public abstract class CredentialBase extends Object
Credential metadata for a model provider.

Each credential carries the connection material (API key, base URL, host, etc.) needed by a specific ChatModelBase subclass. Subclasses declare which model class consumes them via getChatModelClass() and optionally enumerate the catalog of usable models via listModels().

id is an auto-generated 32-char hex string identifying this credential instance; it is carried in JSON for round-tripping but not used for authentication itself.

  • 构造器详细资料

    • CredentialBase

      protected CredentialBase(String id)
  • 方法详细资料

    • getId

      public final String getId()
    • getChatModelClass

      public abstract Class<? extends ChatModelBase> getChatModelClass()
      The ChatModelBase subclass that consumes this credential. Subclasses without a matching Java model implementation throw UnsupportedOperationException.
    • listModels

      public reactor.core.publisher.Mono<List<ModelCard>> listModels()
      Enumerate the candidate models available under this credential. The default implementation throws UnsupportedOperationException; concrete model discovery is provided by a future ChatModelBase.listModels hook.