Package org.openapitools.client.api
Class MessageApi
- java.lang.Object
-
- org.openapitools.client.api.MessageApi
-
public class MessageApi extends Object
-
-
Constructor Summary
Constructors Constructor Description MessageApi()MessageApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateMessageCompletionHandler(String trDataset, CreateMessageData createMessageData)Create a message Create a message Create a message.okhttp3.CallcreateMessageCompletionHandlerAsync(String trDataset, CreateMessageData createMessageData, ApiCallback<String> _callback)Create a message (asynchronously) Create a message Create a message.okhttp3.CallcreateMessageCompletionHandlerCall(String trDataset, CreateMessageData createMessageData, ApiCallback _callback)Build call for createMessageCompletionHandlerApiResponse<String>createMessageCompletionHandlerWithHttpInfo(@NotNull String trDataset, @NotNull CreateMessageData createMessageData)Create a message Create a message Create a message.voideditMessageHandler(String trDataset, EditMessageData editMessageData)Edit a message Edit a message Edit a message which exists within the topic's chat history.okhttp3.CalleditMessageHandlerAsync(String trDataset, EditMessageData editMessageData, ApiCallback<Void> _callback)Edit a message (asynchronously) Edit a message Edit a message which exists within the topic's chat history.okhttp3.CalleditMessageHandlerCall(String trDataset, EditMessageData editMessageData, ApiCallback _callback)Build call for editMessageHandlerApiResponse<Void>editMessageHandlerWithHttpInfo(@NotNull String trDataset, @NotNull EditMessageData editMessageData)Edit a message Edit a message Edit a message which exists within the topic's chat history.List<Message>getAllTopicMessages(String trDataset, UUID messagesTopicId)Get all messages for a given topic Get all messages for a given topic Get all messages for a given topic.okhttp3.CallgetAllTopicMessagesAsync(String trDataset, UUID messagesTopicId, ApiCallback<List<Message>> _callback)Get all messages for a given topic (asynchronously) Get all messages for a given topic Get all messages for a given topic.okhttp3.CallgetAllTopicMessagesCall(String trDataset, UUID messagesTopicId, ApiCallback _callback)Build call for getAllTopicMessagesApiResponse<List<Message>>getAllTopicMessagesWithHttpInfo(@NotNull String trDataset, @NotNull UUID messagesTopicId)Get all messages for a given topic Get all messages for a given topic Get all messages for a given topic.ApiClientgetApiClient()StringgetCustomBaseUrl()intgetHostIndex()StringregenerateMessageHandler(String trDataset, RegenerateMessageData regenerateMessageData)Regenerate message Regenerate message Regenerate the assistant response to the last user message of a topic.okhttp3.CallregenerateMessageHandlerAsync(String trDataset, RegenerateMessageData regenerateMessageData, ApiCallback<String> _callback)Regenerate message (asynchronously) Regenerate message Regenerate the assistant response to the last user message of a topic.okhttp3.CallregenerateMessageHandlerCall(String trDataset, RegenerateMessageData regenerateMessageData, ApiCallback _callback)Build call for regenerateMessageHandlerApiResponse<String>regenerateMessageHandlerWithHttpInfo(@NotNull String trDataset, @NotNull RegenerateMessageData regenerateMessageData)Regenerate message Regenerate message Regenerate the assistant response to the last user message of a topic.voidsetApiClient(ApiClient apiClient)voidsetCustomBaseUrl(String customBaseUrl)voidsetHostIndex(int hostIndex)
-
-
-
Constructor Detail
-
MessageApi
public MessageApi()
-
MessageApi
public MessageApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
getHostIndex
public int getHostIndex()
-
setHostIndex
public void setHostIndex(int hostIndex)
-
getCustomBaseUrl
public String getCustomBaseUrl()
-
setCustomBaseUrl
public void setCustomBaseUrl(String customBaseUrl)
-
createMessageCompletionHandlerCall
public okhttp3.Call createMessageCompletionHandlerCall(String trDataset, CreateMessageData createMessageData, ApiCallback _callback) throws ApiException
Build call for createMessageCompletionHandler- Parameters:
trDataset- The dataset id to use for the request (required)createMessageData- JSON request payload to create a message completion (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
createMessageCompletionHandler
public String createMessageCompletionHandler(String trDataset, CreateMessageData createMessageData) throws ApiException
Create a message Create a message Create a message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)createMessageData- JSON request payload to create a message completion (required)- Returns:
- 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 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
createMessageCompletionHandlerWithHttpInfo
public ApiResponse<String> createMessageCompletionHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull CreateMessageData createMessageData) throws ApiException
Create a message Create a message Create a message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)createMessageData- JSON request payload to create a message completion (required)- Returns:
- 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 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
createMessageCompletionHandlerAsync
public okhttp3.Call createMessageCompletionHandlerAsync(String trDataset, CreateMessageData createMessageData, ApiCallback<String> _callback) throws ApiException
Create a message (asynchronously) Create a message Create a message. Messages are attached to topics in order to coordinate memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon. Currently, you can only send user messages. If the topic is a RAG topic then the response will include Chunks first on the stream. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)createMessageData- JSON request payload to create a message completion (required)_callback- The callback to be executed when the API call finishes- Returns:
- 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 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
editMessageHandlerCall
public okhttp3.Call editMessageHandlerCall(String trDataset, EditMessageData editMessageData, ApiCallback _callback) throws ApiException
Build call for editMessageHandler- Parameters:
trDataset- The dataset id to use for the request (required)editMessageData- JSON request payload to edit a message and get a new stream (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 This will be a HTTP stream, check the chat or search UI for an example how to process this - 400 Service error relating to getting a chat completion -
-
editMessageHandler
public void editMessageHandler(String trDataset, EditMessageData editMessageData) throws ApiException
Edit a message Edit a message Edit a message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)editMessageData- JSON request payload to edit a message and get a new stream (required)- 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 This will be a HTTP stream, check the chat or search UI for an example how to process this - 400 Service error relating to getting a chat completion -
-
editMessageHandlerWithHttpInfo
public ApiResponse<Void> editMessageHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull EditMessageData editMessageData) throws ApiException
Edit a message Edit a message Edit a message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)editMessageData- JSON request payload to edit a message and get a new stream (required)- Returns:
- ApiResponse<Void>
- 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 This will be a HTTP stream, check the chat or search UI for an example how to process this - 400 Service error relating to getting a chat completion -
-
editMessageHandlerAsync
public okhttp3.Call editMessageHandlerAsync(String trDataset, EditMessageData editMessageData, ApiCallback<Void> _callback) throws ApiException
Edit a message (asynchronously) Edit a message Edit a message which exists within the topic's chat history. This will delete the message and replace it with a new message. The new message will be generated by the AI based on the new content provided in the request body. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)editMessageData- JSON request payload to edit a message and get a new stream (required)_callback- The callback to be executed when the API call finishes- Returns:
- 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 This will be a HTTP stream, check the chat or search UI for an example how to process this - 400 Service error relating to getting a chat completion -
-
getAllTopicMessagesCall
public okhttp3.Call getAllTopicMessagesCall(String trDataset, UUID messagesTopicId, ApiCallback _callback) throws ApiException
Build call for getAllTopicMessages- Parameters:
trDataset- The dataset id to use for the request (required)messagesTopicId- The ID of the topic to get messages for. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 All messages relating to the topic with the given ID - 400 Service error relating to getting the messages -
-
getAllTopicMessages
public List<Message> getAllTopicMessages(String trDataset, UUID messagesTopicId) throws ApiException
Get all messages for a given topic Get all messages for a given topic Get all messages for a given topic. If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)messagesTopicId- The ID of the topic to get messages for. (required)- Returns:
- List<Message>
- 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 All messages relating to the topic with the given ID - 400 Service error relating to getting the messages -
-
getAllTopicMessagesWithHttpInfo
public ApiResponse<List<Message>> getAllTopicMessagesWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull UUID messagesTopicId) throws ApiException
Get all messages for a given topic Get all messages for a given topic Get all messages for a given topic. If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)messagesTopicId- The ID of the topic to get messages for. (required)- Returns:
- ApiResponse<List<Message>>
- 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 All messages relating to the topic with the given ID - 400 Service error relating to getting the messages -
-
getAllTopicMessagesAsync
public okhttp3.Call getAllTopicMessagesAsync(String trDataset, UUID messagesTopicId, ApiCallback<List<Message>> _callback) throws ApiException
Get all messages for a given topic (asynchronously) Get all messages for a given topic Get all messages for a given topic. If the topic is a RAG topic then the response will include Chunks first on each message. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)messagesTopicId- The ID of the topic to get messages for. (required)_callback- The callback to be executed when the API call finishes- Returns:
- 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 All messages relating to the topic with the given ID - 400 Service error relating to getting the messages -
-
regenerateMessageHandlerCall
public okhttp3.Call regenerateMessageHandlerCall(String trDataset, RegenerateMessageData regenerateMessageData, ApiCallback _callback) throws ApiException
Build call for regenerateMessageHandler- Parameters:
trDataset- The dataset id to use for the request (required)regenerateMessageData- JSON request payload to delete an agent message then regenerate it in a strem (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- Http Response Details:
Status Code Description Response Headers 200 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
regenerateMessageHandler
public String regenerateMessageHandler(String trDataset, RegenerateMessageData regenerateMessageData) throws ApiException
Regenerate message Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)regenerateMessageData- JSON request payload to delete an agent message then regenerate it in a strem (required)- Returns:
- 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 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
regenerateMessageHandlerWithHttpInfo
public ApiResponse<String> regenerateMessageHandlerWithHttpInfo(@NotNull @NotNull String trDataset, @NotNull @NotNull RegenerateMessageData regenerateMessageData) throws ApiException
Regenerate message Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)regenerateMessageData- JSON request payload to delete an agent message then regenerate it in a strem (required)- Returns:
- 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 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
regenerateMessageHandlerAsync
public okhttp3.Call regenerateMessageHandlerAsync(String trDataset, RegenerateMessageData regenerateMessageData, ApiCallback<String> _callback) throws ApiException
Regenerate message (asynchronously) Regenerate message Regenerate the assistant response to the last user message of a topic. This will delete the last message and replace it with a new message. The response will include Chunks first on the stream if the topic is using RAG. The structure will look like `[chunks]||mesage`. See docs.trieve.ai for more information.- Parameters:
trDataset- The dataset id to use for the request (required)regenerateMessageData- JSON request payload to delete an agent message then regenerate it in a strem (required)_callback- The callback to be executed when the API call finishes- Returns:
- 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 This will be a JSON response of a string containing the LLM's generated inference. Response if not streaming. - 400 Service error relating to getting a chat completion -
-
-