Class TopicApi


  • public class TopicApi
    extends Object
    • Constructor Detail

      • TopicApi

        public TopicApi()
      • TopicApi

        public TopicApi​(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)
      • createTopicCall

        public okhttp3.Call createTopicCall​(String trDataset,
                                            CreateTopicData createTopicData,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for createTopic
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createTopicData - JSON request payload to create chat topic (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 The JSON response payload containing the created topic -
        400 Topic name empty or a service error -
      • createTopic

        public Topic createTopic​(String trDataset,
                                 CreateTopicData createTopicData)
                          throws ApiException
        Create Topic Create Topic Create a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createTopicData - JSON request payload to create chat topic (required)
        Returns:
        Topic
        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 The JSON response payload containing the created topic -
        400 Topic name empty or a service error -
      • createTopicWithHttpInfo

        public ApiResponse<Topic> createTopicWithHttpInfo​(@NotNull
                                                          @NotNull String trDataset,
                                                          @NotNull
                                                          @NotNull CreateTopicData createTopicData)
                                                   throws ApiException
        Create Topic Create Topic Create a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createTopicData - JSON request payload to create chat topic (required)
        Returns:
        ApiResponse<Topic>
        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 The JSON response payload containing the created topic -
        400 Topic name empty or a service error -
      • createTopicAsync

        public okhttp3.Call createTopicAsync​(String trDataset,
                                             CreateTopicData createTopicData,
                                             ApiCallback<Topic> _callback)
                                      throws ApiException
        Create Topic (asynchronously) Create Topic Create a new chat topic. Topics are attached to a user and act as a coordinator for memory of gen-AI chat sessions. We are considering refactoring this resource of the API soon.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createTopicData - JSON request payload to create chat topic (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 The JSON response payload containing the created topic -
        400 Topic name empty or a service error -
      • deleteTopicCall

        public okhttp3.Call deleteTopicCall​(String trDataset,
                                            DeleteTopicData deleteTopicData,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for deleteTopic
        Parameters:
        trDataset - The dataset id to use for the request (required)
        deleteTopicData - JSON request payload to delete a chat topic (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
        204 Confirmation that the topic was deleted -
        400 Service error relating to topic deletion -
      • deleteTopic

        public void deleteTopic​(String trDataset,
                                DeleteTopicData deleteTopicData)
                         throws ApiException
        Delete Topic Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        deleteTopicData - JSON request payload to delete a chat topic (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
        204 Confirmation that the topic was deleted -
        400 Service error relating to topic deletion -
      • deleteTopicWithHttpInfo

        public ApiResponse<Void> deleteTopicWithHttpInfo​(@NotNull
                                                         @NotNull String trDataset,
                                                         @NotNull
                                                         @NotNull DeleteTopicData deleteTopicData)
                                                  throws ApiException
        Delete Topic Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        deleteTopicData - JSON request payload to delete a chat topic (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
        204 Confirmation that the topic was deleted -
        400 Service error relating to topic deletion -
      • deleteTopicAsync

        public okhttp3.Call deleteTopicAsync​(String trDataset,
                                             DeleteTopicData deleteTopicData,
                                             ApiCallback<Void> _callback)
                                      throws ApiException
        Delete Topic (asynchronously) Delete Topic Delete an existing chat topic. When a topic is deleted, all associated chat messages are also deleted.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        deleteTopicData - JSON request payload to delete a chat topic (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
        204 Confirmation that the topic was deleted -
        400 Service error relating to topic deletion -
      • getAllTopicsForUserCall

        public okhttp3.Call getAllTopicsForUserCall​(UUID userId,
                                                    String trDataset,
                                                    ApiCallback _callback)
                                             throws ApiException
        Build call for getAllTopicsForUser
        Parameters:
        userId - The id of the user to get topics for (required)
        trDataset - The dataset id to use for the request (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 topics belonging to a given user -
        400 Service error relating to topic get -
      • getAllTopicsForUser

        public List<Topic> getAllTopicsForUser​(UUID userId,
                                               String trDataset)
                                        throws ApiException
        Get All Topics for User Get All Topics for User Get all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.
        Parameters:
        userId - The id of the user to get topics for (required)
        trDataset - The dataset id to use for the request (required)
        Returns:
        List<Topic>
        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 topics belonging to a given user -
        400 Service error relating to topic get -
      • getAllTopicsForUserWithHttpInfo

        public ApiResponse<List<Topic>> getAllTopicsForUserWithHttpInfo​(@NotNull
                                                                        @NotNull UUID userId,
                                                                        @NotNull
                                                                        @NotNull String trDataset)
                                                                 throws ApiException
        Get All Topics for User Get All Topics for User Get all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.
        Parameters:
        userId - The id of the user to get topics for (required)
        trDataset - The dataset id to use for the request (required)
        Returns:
        ApiResponse<List<Topic>>
        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 topics belonging to a given user -
        400 Service error relating to topic get -
      • getAllTopicsForUserAsync

        public okhttp3.Call getAllTopicsForUserAsync​(UUID userId,
                                                     String trDataset,
                                                     ApiCallback<List<Topic>> _callback)
                                              throws ApiException
        Get All Topics for User (asynchronously) Get All Topics for User Get all topics belonging to a the auth'ed user. Soon, we plan to allow specification of the user for this route and include pagination.
        Parameters:
        userId - The id of the user to get topics for (required)
        trDataset - The dataset id to use for the request (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 topics belonging to a given user -
        400 Service error relating to topic get -
      • updateTopicCall

        public okhttp3.Call updateTopicCall​(String trDataset,
                                            UpdateTopicData updateTopicData,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for updateTopic
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateTopicData - JSON request payload to update a chat topic (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
        204 Confirmation that the topic was updated -
        400 Service error relating to topic update -
      • updateTopic

        public void updateTopic​(String trDataset,
                                UpdateTopicData updateTopicData)
                         throws ApiException
        Update Topic Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateTopicData - JSON request payload to update a chat topic (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
        204 Confirmation that the topic was updated -
        400 Service error relating to topic update -
      • updateTopicWithHttpInfo

        public ApiResponse<Void> updateTopicWithHttpInfo​(@NotNull
                                                         @NotNull String trDataset,
                                                         @NotNull
                                                         @NotNull UpdateTopicData updateTopicData)
                                                  throws ApiException
        Update Topic Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateTopicData - JSON request payload to update a chat topic (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
        204 Confirmation that the topic was updated -
        400 Service error relating to topic update -
      • updateTopicAsync

        public okhttp3.Call updateTopicAsync​(String trDataset,
                                             UpdateTopicData updateTopicData,
                                             ApiCallback<Void> _callback)
                                      throws ApiException
        Update Topic (asynchronously) Update Topic Update an existing chat topic. Currently, only the name of the topic can be updated.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateTopicData - JSON request payload to update a chat topic (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
        204 Confirmation that the topic was updated -
        400 Service error relating to topic update -