类:HttpApiClient

java.lang.Object
com.google.adk.sessions.HttpApiClient

public class HttpApiClient extends Object
用于 HTTP API 的基础客户端。
  • 字段详情

    • MEDIA_TYPE_APPLICATION_JSON

      public static final okhttp3.MediaType MEDIA_TYPE_APPLICATION_JSON
  • 方法详细信息(Method Details)

    • request

      public ApiResponse request(String httpMethod, String path, String requestJson)
      根据指定的 HTTP 方法、路径以及请求 JSON 字符串,发送一个 HTTP 请求。
    • vertexAI

      public boolean vertexAI()
      返回客户端是否正在使用 Vertex AI API 的信息。
    • project

      public @Nullable String project()
      返回用于 Vertex AI API 的项目 ID。
    • location

      public @Nullable String location()
      返回 Vertex AI API 的访问地址(即 API 的位置)。
    • apiKey

      public @Nullable String apiKey()
      返回用于访问 Google AI API 的 API 密钥。