public interface AgentsApi
| Modifier and Type | Method and Description |
|---|---|
retrofit2.Call<okhttp3.ResponseBody> |
agentsCompletionStream(AgentsCompletionRequest request)
Create a streaming agent completion with GLM-4 All Tools Returns agent responses in
real-time through Server-Sent Events (SSE) Automatically selects and calls
appropriate tools (web search, code execution, image generation)
|
io.reactivex.rxjava3.core.Single<ModelData> |
agentsCompletionSync(AgentsCompletionRequest request)
Create a synchronous agent completion with GLM-4 All Tools Waits for the agent to
complete complex task execution and returns the final result Supports automatic
tool selection including CogView3 image generation, Python code interpreter, and
web browsing
|
io.reactivex.rxjava3.core.Single<ModelData> |
queryAgentsAsyncResult(AgentAsyncResultRetrieveParams request)
Query the result of an asynchronous agent execution Retrieves the agent execution
result using the task parameters for long-running tasks Useful for complex
multi-tool operations that require extended processing time
|
@Streaming
@POST(value="v1/agents")
retrofit2.Call<okhttp3.ResponseBody> agentsCompletionStream(@Body
AgentsCompletionRequest request)
request - Agent completion parameters including tools, functions, and
execution context@POST(value="v1/agents") io.reactivex.rxjava3.core.Single<ModelData> agentsCompletionSync(@Body AgentsCompletionRequest request)
request - Agent completion parameters including tools, functions, and
execution context@POST(value="v1/agents/async-result") io.reactivex.rxjava3.core.Single<ModelData> queryAgentsAsyncResult(@Body AgentAsyncResultRetrieveParams request)
request - Parameters for retrieving asynchronous agent execution resultsCopyright © 2025. All rights reserved.