| Package | Description |
|---|---|
| ai.z.openapi.api.chat | |
| ai.z.openapi.service.chat |
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.rxjava3.core.Single<ModelData> |
ChatApi.createChatCompletion(ChatCompletionCreateParams request)
Create a synchronous chat completion with immediate response Waits for the GLM-4
model to complete execution and returns the final result Supports complex
reasoning, tool calling, function execution, and multi-modal understanding Features
advanced capabilities like web search integration, code interpretation, and image
analysis
|
io.reactivex.rxjava3.core.Single<ModelData> |
ChatApi.createChatCompletion(ChatCompletionCreateParams request,
Map<String,String> headers)
Create a synchronous chat completion with custom headers support Waits for the
GLM-4 model to complete execution and returns the final result with custom HTTP
headers Supports complex reasoning, tool calling, function execution, and
multi-modal understanding Features advanced capabilities like web search
integration, code interpretation, and image analysis
|
io.reactivex.rxjava3.core.Single<ModelData> |
ChatApi.createChatCompletionAsync(ChatCompletionCreateParams request)
Create an asynchronous chat completion for long-running tasks Submits the request
and returns immediately with a task ID for later result retrieval Ideal for complex
reasoning tasks, long document processing, or batch operations Supports advanced
GLM-4 models with extended context and computational requirements
|
retrofit2.Call<okhttp3.ResponseBody> |
ChatApi.createChatCompletionStream(ChatCompletionCreateParams request)
Create a streaming chat completion with real-time response Returns response content
incrementally through Server-Sent Events (SSE) for immediate user feedback
Optimized for interactive applications requiring low latency and progressive
content delivery Supports all GLM-4 models with configurable streaming parameters
and token-by-token generation
|
retrofit2.Call<okhttp3.ResponseBody> |
ChatApi.createChatCompletionStream(ChatCompletionCreateParams request,
Map<String,String> headers)
Create a streaming chat completion with custom headers support Returns response
content incrementally through Server-Sent Events (SSE) for immediate user feedback
Optimized for interactive applications requiring low latency and progressive
content delivery Supports all GLM-4 models with configurable streaming parameters
and custom HTTP headers
|
| Modifier and Type | Method and Description |
|---|---|
ChatCompletionResponse |
ChatService.asyncChatCompletion(ChatCompletionCreateParams request)
Creates an asynchronous chat completion.
|
ChatCompletionResponse |
ChatServiceImpl.asyncChatCompletion(ChatCompletionCreateParams request) |
ChatCompletionResponse |
ChatService.createChatCompletion(ChatCompletionCreateParams request)
Creates a chat completion, either streaming or non-streaming based on the request
configuration.
|
ChatCompletionResponse |
ChatServiceImpl.createChatCompletion(ChatCompletionCreateParams request) |
ChatCompletionResponse |
ChatService.createChatCompletion(ChatCompletionCreateParams request,
Map<String,String> customHeaders)
Creates a chat completion with custom headers support.
|
ChatCompletionResponse |
ChatServiceImpl.createChatCompletion(ChatCompletionCreateParams request,
Map<String,String> customHeaders) |
Copyright © 2025. All rights reserved.