public class ChatServiceImpl extends Object implements ChatService
| Constructor and Description |
|---|
ChatServiceImpl(AbstractAiClient zAiClient) |
| Modifier and Type | Method and Description |
|---|---|
ChatCompletionResponse |
asyncChatCompletion(ChatCompletionCreateParams request)
Creates an asynchronous chat completion.
|
ChatCompletionResponse |
createChatCompletion(ChatCompletionCreateParams request)
Creates a chat completion, either streaming or non-streaming based on the request
configuration.
|
ChatCompletionResponse |
createChatCompletion(ChatCompletionCreateParams request,
Map<String,String> customHeaders)
Creates a chat completion with custom headers support.
|
QueryModelResultResponse |
retrieveAsyncResult(AsyncResultRetrieveParams request)
Retrieves the result of an asynchronous model operation.
|
public ChatServiceImpl(AbstractAiClient zAiClient)
public ChatCompletionResponse createChatCompletion(ChatCompletionCreateParams request)
ChatServicecreateChatCompletion in interface ChatServicerequest - the chat completion requestpublic ChatCompletionResponse asyncChatCompletion(ChatCompletionCreateParams request)
ChatServiceasyncChatCompletion in interface ChatServicerequest - the chat completion requestpublic QueryModelResultResponse retrieveAsyncResult(AsyncResultRetrieveParams request)
ChatServiceretrieveAsyncResult in interface ChatServicerequest - the query request for the async resultpublic ChatCompletionResponse createChatCompletion(ChatCompletionCreateParams request, Map<String,String> customHeaders)
ChatServicecreateChatCompletion in interface ChatServicerequest - the chat completion request parameterscustomHeaders - custom HTTP headers to be added to the requestCopyright © 2025. All rights reserved.