All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fun.freechat.client.api.ChatApi Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
/*
 * FreeChat OpenAPI Definition
 * # FreeChat: Create Some Friends for Yourself with AI  English | [中文版](https://github.com/freechat-fun/freechat/blob/main/README.zh-CN.md)  ## Introduction Welcome! FreeChat aims to build a cloud-native, robust, and quickly commercializable enterprise-level AI virtual character platform.  It also serves as a prompt engineering platform.  ## Features - Primarily uses Java and emphasizes **security, robustness, scalability, traceability, and maintainability**. - Boasts **account systems and permission management**, supporting OAuth2 authentication. Introduces the \"organization\" concept and related permission constraint functions. - Extensively employs distributed technologies and caching to support **high concurrency** access. - Provides flexible character customization options, supports direct intervention in prompts, and supports **configuring multiple backends for each character**. - **Offers a comprehensive range of Open APIs**, with more than 180 interfaces and provides java/python/typescript SDKs. These interfaces enable easy construction of systems for end-users. - Supports setting **RAG** (Retrieval Augmented Generation) for characters. - Supports **long-term memory, preset memory** for characters. - Supports characters evoking **proactive chat**. - Supports setting **quota limits** for characters. - Supports characters **importing and exporting**. - Supports individual **debugging and sharing prompts**.  ## Snapshots ### On PC #### Home Page ![Home Page Snapshot](/img/snapshot_w1.jpg) #### Development View ![Development View Snapshot](/img/snapshot_w2.jpg) #### Chat View ![Chat View Snapshot](/img/snapshot_w3.jpg)  ### On Mobile ![Chat Snapshot 1](/img/snapshot_m1.jpg) ![Chat Snapshot 2](/img/snapshot_m2.jpg)
![Chat Snapshot 3](/img/snapshot_m3.jpg) ![Chat Snapshot 4](/img/snapshot_m4.jpg) ## Character Design ```mermaid flowchart TD A(Character) --> B(Profile) A --> C(Knowledge/RAG) A --> D(Album) A --> E(Backend-1) A --> F(Backend-n...) E --> G(Message Window) E --> H(Long Term Memory Settings) E --> I(Quota Limit) E --> J(Chat Prompt Task) E --> K(Greeting Prompt Task) E --> L(Moderation Settings) J --> M(Model & Parameters) J --> N(API Keys) J --> O(Prompt Refence) J --> P(Tool Specifications) O --> Q(Template) O --> R(Variables) O --> S(Version) O --> T(...) style K stroke-dasharray: 5, 5 style L stroke-dasharray: 5, 5 style P stroke-dasharray: 5, 5 ``` After setting up an unified persona and knowledge for a character, different backends can be configured. For example, different model may be adopted for different users based on cost considerations. ## How to Play ### Online Website You can visit [freechat.fun](https://www.freechat.fun) to experience FreeChat. Share your designed AI character! ### Running in a Kubernetes Cluster FreeChat is dedicated to the principles of cloud-native design. If you have a Kubernetes cluster, you can deploy FreeChat to your environment by following these steps: 1. Put the Kubernetes configuration file in the `configs/helm/` directory, named `kube-private.conf`. 2. Place the Helm configuration file in the same directory, named `values-private.yaml`. Make sure to reference the default `values.yaml` and customize the variables as needed. 3. Switch to the `scripts/` directory. 4. If needed, run `install-in.sh` to deploy `ingress-nginx` on the Kubernetes cluster. 5. If needed, run `install-cm.sh` to deploy `cert-manager` on the Kubernetes cluster, which automatically issues certificates for domains specified in `ingress.hosts`. 6. Run `install-pvc.sh` to install PersistentVolumeClaim resources. > By default, FreeChat operates files by accessing the \"local file system.\" You may want to use high-availability distributed storage in the cloud. As a cloud-native-designed system, we recommend interfacing through Kubernetes CSI to avoid individually adapting storage products for each cloud platform. Most cloud service providers offer cloud storage drivers for Kubernetes, with a series of predefined StorageClass resources. Please choose the appropriate configuration according to your actual needs and set it in Helm's `global.storageClass` option. > > *In the future, FreeChat may be refactored to use MinIO's APIs directly, as it is now installed in the Kubernetes cluster as a dependency (serving Milvus).* 7. Run `install.sh` script to install FreeChat and its dependencies. 8. FreeChat aims to provide Open API services. If you like the interactive experience of [freechat.fun](https://freechat.fun), run `install-web.sh` to deploy the front-end application. 9. Run `restart.sh` to restart the service. 10. If you modified any Helm configuration files, use `upgrade.sh` to update the corresponding Kubernetes resources. 11. To remove specific resources, run the `uninstall*.sh` script corresponding to the resource you want to uninstall. As a cloud-native application, the services FreeChat relies on are obtained and deployed to your cluster through the helm repository. If you prefer cloud services with SLA (Service Level Agreement) guarantees, simply make the relevant settings in `configs/helm/values-private.yaml`: ```yaml mysql: deployment: enabled: false url: auth: rootPassword: username: password: redis: deployment: enabled: false url: auth: password: milvus: deployment: enabled: false url: milvus: auth: token: ``` With this, FreeChat will not automatically install these services, but rather use the configuration information to connect directly. If your Kubernetes cluster does not have a standalone monitoring system, you can enable the following switch. This will install Prometheus and Grafana services in the same namespace, dedicated to monitoring the status of the services under the FreeChat application: ```yaml prometheus: deployment: enabled: true grafana: deployment: enabled: true ``` ### Running Locally You can also run FreeChat locally. Currently supported on MacOS and Linux (although only tested on MacOS). You need to install the Docker toolset and have a network that can access [Docker Hub](https://hub.docker.com/). Once ready, enter the `scripts/` directory and run `local-run.sh`, which will download and run the necessary docker containers. After a successful startup, you can access `http://localhost` via a browser to see the locally running freechat.fun. The built-in administrator username and password are \"admin:freechat\". Use `local-run.sh --help` to view the supported options of the script. Good luck! ### Running in an IDE To run FreeChat in an IDE, you need to start all dependent services first but do not need to run the container for the FreeChat application itself. You can execute the `scripts/local-deps.sh` script to start services like `MySQL`, `Redis`, `Milvus`, etc., locally. Once done, open and debug `freechat-start/src/main/java/fun/freechat/Application.java`。Make sure you have set the following startup VM options: ```shell -Dspring.config.location=classpath:/application.yml,classpath:/application-local.yml \\ -DAPP_HOME=local-data/freechat \\ -Dspring.profiles.active=local ``` ### Use SDK #### Java - **Dependency** ```xml fun.freechat freechat-sdk ${freechat-sdk.version} ``` - **Example** ```java import fun.freechat.client.ApiClient; import fun.freechat.client.ApiException; import fun.freechat.client.Configuration; import fun.freechat.client.api.AccountApi; import fun.freechat.client.auth.ApiKeyAuth; import fun.freechat.client.model.UserDetailsDTO; public class AccountClientExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath(\"https://freechat.fun\"); // Configure HTTP bearer authorization: bearerAuth HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication(\"bearerAuth\"); bearerAuth.setBearerToken(\"FREECHAT_TOKEN\"); AccountApi apiInstance = new AccountApi(defaultClient); try { UserDetailsDTO result = apiInstance.getUserDetails(); System.out.println(result); } catch (ApiException e) { e.printStackTrace(); } } } ``` #### Python - **Installation** ```shell pip install freechat-sdk ``` - **Example** ```python import freechat_sdk from freechat_sdk.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://freechat.fun # See configuration.py for a list of all supported configuration parameters. configuration = freechat_sdk.Configuration( host = \"https://freechat.fun\" ) # Configure Bearer authorization: bearerAuth configuration = freechat_sdk.Configuration( access_token = os.environ[\"FREECHAT_TOKEN\"] ) # Enter a context with an instance of the API client with freechat_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = freechat_sdk.AccountApi(api_client) try: details = api_instance.get_user_details() pprint(details) except ApiException as e: print(\"Exception when calling AccountClient->get_user_details: %s\\n\" % e) ``` #### TypeScript - **Installation** ```shell npm install freechat-sdk --save ``` - **Example** Refer to [FreeChatApiContext.tsx](https://github.com/freechat-fun/freechat/blob/main/freechat-web/src/contexts/FreeChatApiProvider.tsx) ## System Dependencies | | Projects | ---- | ---- | Application Framework | [Spring Boot](https://spring.io/projects/spring-boot/) | LLM Framework | [LangChain4j](https://docs.langchain4j.dev/) | Model Providers | [OpenAI](https://platform.openai.com/), [Azure OpenAI](https://oai.azure.com/), [DashScope(Alibaba)](https://dashscope.aliyun.com/) | Database Systems | [MySQL](https://www.mysql.com/), [Redis](https://redis.io/), [Milvus](https://milvus.io/) | Monitoring & Alerting | [Prometheus](https://prometheus.io/), [Grafana](https://grafana.com/) | OpenAPI Tools | [Springdoc-openapi](https://springdoc.org/), [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator), [OpenAPI Explorer](https://github.com/Authress-Engineering/openapi-explorer) ## Collaboration ### Application Integration The FreeChat system is entirely oriented towards Open APIs. The site [freechat.fun](https://freechat.fun) is developed using its TypeScript SDK and hardly depends on private interfaces. You can use these online interfaces to develop your own applications or sites, making them fit your preferences. Currently, FreeChat is completely free with no paid plans (after all, users use their own API Key to call LLM services). ### Model Integration FreeChat aims to explore AI virtual character technology with anthropomorphic characteristics. So far, it supports model services from OpenAI GPT and Alibaba Qwen series models. However, we are more interested in supporting models that are under research and can endow AI with more personality traits. If you are researching this area and hope FreeChat supports your model, please contact us. We look forward to AI technology helping people create their own \"soul mates\" in the future. * * The version of the OpenAPI document: 1.4.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package fun.freechat.client.api; import fun.freechat.client.ApiCallback; import fun.freechat.client.ApiClient; import fun.freechat.client.ApiException; import fun.freechat.client.ApiResponse; import fun.freechat.client.Configuration; import fun.freechat.client.Pair; import fun.freechat.client.ProgressRequestBody; import fun.freechat.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import fun.freechat.client.model.ChatCreateDTO; import fun.freechat.client.model.ChatMessageDTO; import fun.freechat.client.model.ChatMessageRecordDTO; import fun.freechat.client.model.ChatSessionDTO; import fun.freechat.client.model.ChatUpdateDTO; import fun.freechat.client.model.LlmResultDTO; import fun.freechat.client.model.MemoryUsageDTO; import fun.freechat.client.model.SseEmitter; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class ChatApi { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; public ChatApi() { this(Configuration.getDefaultApiClient()); } public ChatApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } public int getHostIndex() { return localHostIndex; } public void setHostIndex(int hostIndex) { this.localHostIndex = hostIndex; } public String getCustomBaseUrl() { return localCustomBaseUrl; } public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } /** * Build call for clearMemory * @param chatId Chat session identifier (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call clearMemoryCall(String chatId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/memory/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call clearMemoryValidateBeforeCall(String chatId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling clearMemory(Async)"); } return clearMemoryCall(chatId, _callback); } /** * Clear Memory * Clear memory of the chat session. * @param chatId Chat session identifier (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List clearMemory(String chatId) throws ApiException { ApiResponse> localVarResp = clearMemoryWithHttpInfo(chatId); return localVarResp.getData(); } /** * Clear Memory * Clear memory of the chat session. * @param chatId Chat session identifier (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> clearMemoryWithHttpInfo(String chatId) throws ApiException { okhttp3.Call localVarCall = clearMemoryValidateBeforeCall(chatId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Clear Memory (asynchronously) * Clear memory of the chat session. * @param chatId Chat session identifier (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call clearMemoryAsync(String chatId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = clearMemoryValidateBeforeCall(chatId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteChat * @param chatId Chat session identifier (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call deleteChatCall(String chatId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteChatValidateBeforeCall(String chatId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling deleteChat(Async)"); } return deleteChatCall(chatId, _callback); } /** * Delete Chat Session * Delete the chat session. * @param chatId Chat session identifier (required) * @return Boolean * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public Boolean deleteChat(String chatId) throws ApiException { ApiResponse localVarResp = deleteChatWithHttpInfo(chatId); return localVarResp.getData(); } /** * Delete Chat Session * Delete the chat session. * @param chatId Chat session identifier (required) * @return ApiResponse<Boolean> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse deleteChatWithHttpInfo(String chatId) throws ApiException { okhttp3.Call localVarCall = deleteChatValidateBeforeCall(chatId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Delete Chat Session (asynchronously) * Delete the chat session. * @param chatId Chat session identifier (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call deleteChatAsync(String chatId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteChatValidateBeforeCall(chatId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDefaultChatId * @param characterId Character identifier (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getDefaultChatIdCall(Long characterId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/{characterId}" .replace("{" + "characterId" + "}", localVarApiClient.escapeString(characterId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "text/plain" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDefaultChatIdValidateBeforeCall(Long characterId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'characterId' is set if (characterId == null) { throw new ApiException("Missing the required parameter 'characterId' when calling getDefaultChatId(Async)"); } return getDefaultChatIdCall(characterId, _callback); } /** * Get Default Chat * Get default chat id of current user and the character. * @param characterId Character identifier (required) * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public String getDefaultChatId(Long characterId) throws ApiException { ApiResponse localVarResp = getDefaultChatIdWithHttpInfo(characterId); return localVarResp.getData(); } /** * Get Default Chat * Get default chat id of current user and the character. * @param characterId Character identifier (required) * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse getDefaultChatIdWithHttpInfo(Long characterId) throws ApiException { okhttp3.Call localVarCall = getDefaultChatIdValidateBeforeCall(characterId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Default Chat (asynchronously) * Get default chat id of current user and the character. * @param characterId Character identifier (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getDefaultChatIdAsync(Long characterId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDefaultChatIdValidateBeforeCall(characterId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getMemoryUsage * @param chatId Chat session identifier (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getMemoryUsageCall(String chatId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/memory/usage/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getMemoryUsageValidateBeforeCall(String chatId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling getMemoryUsage(Async)"); } return getMemoryUsageCall(chatId, _callback); } /** * Get Memory Usage * Get memory usage of a chat. * @param chatId Chat session identifier (required) * @return MemoryUsageDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public MemoryUsageDTO getMemoryUsage(String chatId) throws ApiException { ApiResponse localVarResp = getMemoryUsageWithHttpInfo(chatId); return localVarResp.getData(); } /** * Get Memory Usage * Get memory usage of a chat. * @param chatId Chat session identifier (required) * @return ApiResponse<MemoryUsageDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse getMemoryUsageWithHttpInfo(String chatId) throws ApiException { okhttp3.Call localVarCall = getMemoryUsageValidateBeforeCall(chatId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get Memory Usage (asynchronously) * Get memory usage of a chat. * @param chatId Chat session identifier (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call getMemoryUsageAsync(String chatId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMemoryUsageValidateBeforeCall(chatId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listChats * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listChatsCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listChatsValidateBeforeCall(final ApiCallback _callback) throws ApiException { return listChatsCall(_callback); } /** * List Chats * List chats of current user. * @return List<ChatSessionDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listChats() throws ApiException { ApiResponse> localVarResp = listChatsWithHttpInfo(); return localVarResp.getData(); } /** * List Chats * List chats of current user. * @return ApiResponse<List<ChatSessionDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listChatsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = listChatsValidateBeforeCall(null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chats (asynchronously) * List chats of current user. * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listChatsAsync(final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listChatsValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listDebugMessages * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listDebugMessagesCall(String chatId, Integer limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/debug/{chatId}/{limit}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())) .replace("{" + "limit" + "}", localVarApiClient.escapeString(limit.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listDebugMessagesValidateBeforeCall(String chatId, Integer limit, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling listDebugMessages(Async)"); } // verify the required parameter 'limit' is set if (limit == null) { throw new ApiException("Missing the required parameter 'limit' when calling listDebugMessages(Async)"); } return listDebugMessagesCall(chatId, limit, _callback); } /** * List Chat Debug Messages * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listDebugMessages(String chatId, Integer limit) throws ApiException { ApiResponse> localVarResp = listDebugMessagesWithHttpInfo(chatId, limit); return localVarResp.getData(); } /** * List Chat Debug Messages * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listDebugMessagesWithHttpInfo(String chatId, Integer limit) throws ApiException { okhttp3.Call localVarCall = listDebugMessagesValidateBeforeCall(chatId, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chat Debug Messages (asynchronously) * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listDebugMessagesAsync(String chatId, Integer limit, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listDebugMessagesValidateBeforeCall(chatId, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listDebugMessages1 * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listDebugMessages1Call(String chatId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/debug/{chatId}/{limit}/{offset}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())) .replace("{" + "limit" + "}", localVarApiClient.escapeString(limit.toString())) .replace("{" + "offset" + "}", localVarApiClient.escapeString(offset.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listDebugMessages1ValidateBeforeCall(String chatId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling listDebugMessages1(Async)"); } // verify the required parameter 'limit' is set if (limit == null) { throw new ApiException("Missing the required parameter 'limit' when calling listDebugMessages1(Async)"); } // verify the required parameter 'offset' is set if (offset == null) { throw new ApiException("Missing the required parameter 'offset' when calling listDebugMessages1(Async)"); } return listDebugMessages1Call(chatId, limit, offset, _callback); } /** * List Chat Debug Messages * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listDebugMessages1(String chatId, Integer limit, Integer offset) throws ApiException { ApiResponse> localVarResp = listDebugMessages1WithHttpInfo(chatId, limit, offset); return localVarResp.getData(); } /** * List Chat Debug Messages * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listDebugMessages1WithHttpInfo(String chatId, Integer limit, Integer offset) throws ApiException { okhttp3.Call localVarCall = listDebugMessages1ValidateBeforeCall(chatId, limit, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chat Debug Messages (asynchronously) * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listDebugMessages1Async(String chatId, Integer limit, Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listDebugMessages1ValidateBeforeCall(chatId, limit, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listDebugMessages2 * @param chatId Chat session identifier (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listDebugMessages2Call(String chatId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/debug/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listDebugMessages2ValidateBeforeCall(String chatId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling listDebugMessages2(Async)"); } return listDebugMessages2Call(chatId, _callback); } /** * List Chat Debug Messages * List debug messages of a chat. * @param chatId Chat session identifier (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listDebugMessages2(String chatId) throws ApiException { ApiResponse> localVarResp = listDebugMessages2WithHttpInfo(chatId); return localVarResp.getData(); } /** * List Chat Debug Messages * List debug messages of a chat. * @param chatId Chat session identifier (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listDebugMessages2WithHttpInfo(String chatId) throws ApiException { okhttp3.Call localVarCall = listDebugMessages2ValidateBeforeCall(chatId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chat Debug Messages (asynchronously) * List debug messages of a chat. * @param chatId Chat session identifier (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listDebugMessages2Async(String chatId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listDebugMessages2ValidateBeforeCall(chatId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listMessages * @param chatId Chat session identifier (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listMessagesCall(String chatId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listMessagesValidateBeforeCall(String chatId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling listMessages(Async)"); } return listMessagesCall(chatId, _callback); } /** * List Chat Messages * List messages of a chat. * @param chatId Chat session identifier (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listMessages(String chatId) throws ApiException { ApiResponse> localVarResp = listMessagesWithHttpInfo(chatId); return localVarResp.getData(); } /** * List Chat Messages * List messages of a chat. * @param chatId Chat session identifier (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listMessagesWithHttpInfo(String chatId) throws ApiException { okhttp3.Call localVarCall = listMessagesValidateBeforeCall(chatId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chat Messages (asynchronously) * List messages of a chat. * @param chatId Chat session identifier (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listMessagesAsync(String chatId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listMessagesValidateBeforeCall(chatId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listMessages1 * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listMessages1Call(String chatId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/{chatId}/{limit}/{offset}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())) .replace("{" + "limit" + "}", localVarApiClient.escapeString(limit.toString())) .replace("{" + "offset" + "}", localVarApiClient.escapeString(offset.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listMessages1ValidateBeforeCall(String chatId, Integer limit, Integer offset, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling listMessages1(Async)"); } // verify the required parameter 'limit' is set if (limit == null) { throw new ApiException("Missing the required parameter 'limit' when calling listMessages1(Async)"); } // verify the required parameter 'offset' is set if (offset == null) { throw new ApiException("Missing the required parameter 'offset' when calling listMessages1(Async)"); } return listMessages1Call(chatId, limit, offset, _callback); } /** * List Chat Messages * List messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listMessages1(String chatId, Integer limit, Integer offset) throws ApiException { ApiResponse> localVarResp = listMessages1WithHttpInfo(chatId, limit, offset); return localVarResp.getData(); } /** * List Chat Messages * List messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listMessages1WithHttpInfo(String chatId, Integer limit, Integer offset) throws ApiException { okhttp3.Call localVarCall = listMessages1ValidateBeforeCall(chatId, limit, offset, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chat Messages (asynchronously) * List messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param offset Messages offset (from new to old) (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listMessages1Async(String chatId, Integer limit, Integer offset, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listMessages1ValidateBeforeCall(chatId, limit, offset, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listMessages2 * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listMessages2Call(String chatId, Integer limit, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/{chatId}/{limit}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())) .replace("{" + "limit" + "}", localVarApiClient.escapeString(limit.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call listMessages2ValidateBeforeCall(String chatId, Integer limit, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling listMessages2(Async)"); } // verify the required parameter 'limit' is set if (limit == null) { throw new ApiException("Missing the required parameter 'limit' when calling listMessages2(Async)"); } return listMessages2Call(chatId, limit, _callback); } /** * List Chat Messages * List messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @return List<ChatMessageRecordDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List listMessages2(String chatId, Integer limit) throws ApiException { ApiResponse> localVarResp = listMessages2WithHttpInfo(chatId, limit); return localVarResp.getData(); } /** * List Chat Messages * List messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @return ApiResponse<List<ChatMessageRecordDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> listMessages2WithHttpInfo(String chatId, Integer limit) throws ApiException { okhttp3.Call localVarCall = listMessages2ValidateBeforeCall(chatId, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * List Chat Messages (asynchronously) * List messages of a chat. * @param chatId Chat session identifier (required) * @param limit Messages limit (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call listMessages2Async(String chatId, Integer limit, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listMessages2ValidateBeforeCall(chatId, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for rollbackMessages * @param chatId Chat session identifier (required) * @param count Message count to be rolled back (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call rollbackMessagesCall(String chatId, Integer count, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v1/chat/messages/rollback/{chatId}/{count}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())) .replace("{" + "count" + "}", localVarApiClient.escapeString(count.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call rollbackMessagesValidateBeforeCall(String chatId, Integer count, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling rollbackMessages(Async)"); } // verify the required parameter 'count' is set if (count == null) { throw new ApiException("Missing the required parameter 'count' when calling rollbackMessages(Async)"); } return rollbackMessagesCall(chatId, count, _callback); } /** * Rollback Chat Messages * Rollback messages of a chat. * @param chatId Chat session identifier (required) * @param count Message count to be rolled back (required) * @return List<Long> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public List rollbackMessages(String chatId, Integer count) throws ApiException { ApiResponse> localVarResp = rollbackMessagesWithHttpInfo(chatId, count); return localVarResp.getData(); } /** * Rollback Chat Messages * Rollback messages of a chat. * @param chatId Chat session identifier (required) * @param count Message count to be rolled back (required) * @return ApiResponse<List<Long>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse> rollbackMessagesWithHttpInfo(String chatId, Integer count) throws ApiException { okhttp3.Call localVarCall = rollbackMessagesValidateBeforeCall(chatId, count, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Rollback Chat Messages (asynchronously) * Rollback messages of a chat. * @param chatId Chat session identifier (required) * @param count Message count to be rolled back (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call rollbackMessagesAsync(String chatId, Integer count, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = rollbackMessagesValidateBeforeCall(chatId, count, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for sendMessage * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call sendMessageCall(String chatId, ChatMessageDTO chatMessageDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = chatMessageDTO; // create path and map variables String localVarPath = "/api/v1/chat/send/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call sendMessageValidateBeforeCall(String chatId, ChatMessageDTO chatMessageDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling sendMessage(Async)"); } // verify the required parameter 'chatMessageDTO' is set if (chatMessageDTO == null) { throw new ApiException("Missing the required parameter 'chatMessageDTO' when calling sendMessage(Async)"); } return sendMessageCall(chatId, chatMessageDTO, _callback); } /** * Send Chat Message * Send a chat message to character. * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @return LlmResultDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public LlmResultDTO sendMessage(String chatId, ChatMessageDTO chatMessageDTO) throws ApiException { ApiResponse localVarResp = sendMessageWithHttpInfo(chatId, chatMessageDTO); return localVarResp.getData(); } /** * Send Chat Message * Send a chat message to character. * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @return ApiResponse<LlmResultDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse sendMessageWithHttpInfo(String chatId, ChatMessageDTO chatMessageDTO) throws ApiException { okhttp3.Call localVarCall = sendMessageValidateBeforeCall(chatId, chatMessageDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Send Chat Message (asynchronously) * Send a chat message to character. * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call sendMessageAsync(String chatId, ChatMessageDTO chatMessageDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = sendMessageValidateBeforeCall(chatId, chatMessageDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for startChat * @param chatCreateDTO Parameters for starting a chat session (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call startChatCall(ChatCreateDTO chatCreateDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = chatCreateDTO; // create path and map variables String localVarPath = "/api/v1/chat"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "text/plain" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call startChatValidateBeforeCall(ChatCreateDTO chatCreateDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatCreateDTO' is set if (chatCreateDTO == null) { throw new ApiException("Missing the required parameter 'chatCreateDTO' when calling startChat(Async)"); } return startChatCall(chatCreateDTO, _callback); } /** * Start Chat Session * Start a chat session. * @param chatCreateDTO Parameters for starting a chat session (required) * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public String startChat(ChatCreateDTO chatCreateDTO) throws ApiException { ApiResponse localVarResp = startChatWithHttpInfo(chatCreateDTO); return localVarResp.getData(); } /** * Start Chat Session * Start a chat session. * @param chatCreateDTO Parameters for starting a chat session (required) * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse startChatWithHttpInfo(ChatCreateDTO chatCreateDTO) throws ApiException { okhttp3.Call localVarCall = startChatValidateBeforeCall(chatCreateDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Start Chat Session (asynchronously) * Start a chat session. * @param chatCreateDTO Parameters for starting a chat session (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call startChatAsync(ChatCreateDTO chatCreateDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = startChatValidateBeforeCall(chatCreateDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for streamSendMessage * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call streamSendMessageCall(String chatId, ChatMessageDTO chatMessageDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = chatMessageDTO; // create path and map variables String localVarPath = "/api/v1/chat/send/stream/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "text/event-stream" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call streamSendMessageValidateBeforeCall(String chatId, ChatMessageDTO chatMessageDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling streamSendMessage(Async)"); } // verify the required parameter 'chatMessageDTO' is set if (chatMessageDTO == null) { throw new ApiException("Missing the required parameter 'chatMessageDTO' when calling streamSendMessage(Async)"); } return streamSendMessageCall(chatId, chatMessageDTO, _callback); } /** * Send Chat Message by Streaming Back * Refer to /api/v1/chat/send/{chatId}, stream back chunks of the response. * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @return SseEmitter * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public SseEmitter streamSendMessage(String chatId, ChatMessageDTO chatMessageDTO) throws ApiException { ApiResponse localVarResp = streamSendMessageWithHttpInfo(chatId, chatMessageDTO); return localVarResp.getData(); } /** * Send Chat Message by Streaming Back * Refer to /api/v1/chat/send/{chatId}, stream back chunks of the response. * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @return ApiResponse<SseEmitter> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse streamSendMessageWithHttpInfo(String chatId, ChatMessageDTO chatMessageDTO) throws ApiException { okhttp3.Call localVarCall = streamSendMessageValidateBeforeCall(chatId, chatMessageDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Send Chat Message by Streaming Back (asynchronously) * Refer to /api/v1/chat/send/{chatId}, stream back chunks of the response. * @param chatId Chat session identifier (required) * @param chatMessageDTO Chat message (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call streamSendMessageAsync(String chatId, ChatMessageDTO chatMessageDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = streamSendMessageValidateBeforeCall(chatId, chatMessageDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateChat * @param chatId Chat session identifier (required) * @param chatUpdateDTO The chat session information to be updated (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call updateChatCall(String chatId, ChatUpdateDTO chatUpdateDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = chatUpdateDTO; // create path and map variables String localVarPath = "/api/v1/chat/{chatId}" .replace("{" + "chatId" + "}", localVarApiClient.escapeString(chatId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateChatValidateBeforeCall(String chatId, ChatUpdateDTO chatUpdateDTO, final ApiCallback _callback) throws ApiException { // verify the required parameter 'chatId' is set if (chatId == null) { throw new ApiException("Missing the required parameter 'chatId' when calling updateChat(Async)"); } // verify the required parameter 'chatUpdateDTO' is set if (chatUpdateDTO == null) { throw new ApiException("Missing the required parameter 'chatUpdateDTO' when calling updateChat(Async)"); } return updateChatCall(chatId, chatUpdateDTO, _callback); } /** * Update Chat Session * Update the chat session. * @param chatId Chat session identifier (required) * @param chatUpdateDTO The chat session information to be updated (required) * @return Boolean * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public Boolean updateChat(String chatId, ChatUpdateDTO chatUpdateDTO) throws ApiException { ApiResponse localVarResp = updateChatWithHttpInfo(chatId, chatUpdateDTO); return localVarResp.getData(); } /** * Update Chat Session * Update the chat session. * @param chatId Chat session identifier (required) * @param chatUpdateDTO The chat session information to be updated (required) * @return ApiResponse<Boolean> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public ApiResponse updateChatWithHttpInfo(String chatId, ChatUpdateDTO chatUpdateDTO) throws ApiException { okhttp3.Call localVarCall = updateChatValidateBeforeCall(chatId, chatUpdateDTO, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update Chat Session (asynchronously) * Update the chat session. * @param chatId Chat session identifier (required) * @param chatUpdateDTO The chat session information to be updated (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 OK -
*/ public okhttp3.Call updateChatAsync(String chatId, ChatUpdateDTO chatUpdateDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateChatValidateBeforeCall(chatId, chatUpdateDTO, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy