Class AgentStudioConstants

java.lang.Object
com.alibaba.dashscope.applications.agentstudio.AgentStudioConstants

public final class AgentStudioConstants extends Object
  • Field Details

  • Method Details

    • resolveBaseUrl

      public static String resolveBaseUrl(String workspace, String region)
    • defaultHttpBaseUrl

      public static String defaultHttpBaseUrl()
      Default HTTP base URL used when a service option carries no explicit base URL. Reads the neutral DASHSCOPE_HTTP_BASE_URL environment variable and falls back to the public DashScope endpoint for the configured API version. AgentStudio owns this resolution; mutable legacy global state no longer applies.
    • newServiceOption

      public static GeneralServiceOption newServiceOption(HttpMethod method, String path, String baseUrl)
      Build a GeneralServiceOption for an agentstudio endpoint. When baseUrl is non-null it overrides the default; otherwise the request falls back to defaultHttpBaseUrl() via GeneralApi.
    • withApiKey

      public static <P extends HalfDuplexParamBase> P withApiKey(String apiKey, P param)
      Stamp the client's instance apiKey onto a param if the caller didn't set one. The fallback chain in ApiKey.getApiKey(java.lang.String) still applies when apiKey is null.
    • appendParam

      public static void appendParam(StringBuilder sb, String key, Object value)
      Append key=value (URL-encoded) to sb if value is non-null. Joins with &.