Class ChunkApi


  • public class ChunkApi
    extends Object
    • Constructor Detail

      • ChunkApi

        public ChunkApi()
      • ChunkApi

        public ChunkApi​(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)
      • createChunkCall

        public okhttp3.Call createChunkCall​(String trDataset,
                                            CreateChunkData createChunkData,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for createChunk
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createChunkData - JSON request payload to create a new chunk (chunk) (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 JSON response payload containing the created chunk -
        400 Error typically due to deserialization issues -
        426 Error when upgrade is needed to process more chunks -
      • createChunk

        public ReturnQueuedChunk createChunk​(String trDataset,
                                             CreateChunkData createChunkData)
                                      throws ApiException
        Create or Upsert Chunk or Chunks Create or Upsert Chunk or Chunks Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createChunkData - JSON request payload to create a new chunk (chunk) (required)
        Returns:
        ReturnQueuedChunk
        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 JSON response payload containing the created chunk -
        400 Error typically due to deserialization issues -
        426 Error when upgrade is needed to process more chunks -
      • createChunkWithHttpInfo

        public ApiResponse<ReturnQueuedChunk> createChunkWithHttpInfo​(@NotNull
                                                                      @NotNull String trDataset,
                                                                      @NotNull
                                                                      @NotNull CreateChunkData createChunkData)
                                                               throws ApiException
        Create or Upsert Chunk or Chunks Create or Upsert Chunk or Chunks Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createChunkData - JSON request payload to create a new chunk (chunk) (required)
        Returns:
        ApiResponse<ReturnQueuedChunk>
        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 JSON response payload containing the created chunk -
        400 Error typically due to deserialization issues -
        426 Error when upgrade is needed to process more chunks -
      • createChunkAsync

        public okhttp3.Call createChunkAsync​(String trDataset,
                                             CreateChunkData createChunkData,
                                             ApiCallback<ReturnQueuedChunk> _callback)
                                      throws ApiException
        Create or Upsert Chunk or Chunks (asynchronously) Create or Upsert Chunk or Chunks Create a new chunk. If the chunk has the same tracking_id as an existing chunk, the request will fail. Once a chunk is created, it can be searched for using the search endpoint.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        createChunkData - JSON request payload to create a new chunk (chunk) (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 JSON response payload containing the created chunk -
        400 Error typically due to deserialization issues -
        426 Error when upgrade is needed to process more chunks -
      • createSuggestedQueriesHandlerCall

        public okhttp3.Call createSuggestedQueriesHandlerCall​(String trDataset,
                                                              SuggestedQueriesRequest suggestedQueriesRequest,
                                                              ApiCallback _callback)
                                                       throws ApiException
        Build call for createSuggestedQueriesHandler
        Parameters:
        trDataset - The dataset id to use for the request (required)
        suggestedQueriesRequest - JSON request payload to get alternative suggested queries (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 A JSON object containing a list of alternative suggested queries -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • createSuggestedQueriesHandler

        public SuggestedQueriesResponse createSuggestedQueriesHandler​(String trDataset,
                                                                      SuggestedQueriesRequest suggestedQueriesRequest)
                                                               throws ApiException
        Generate suggested queries Generate suggested queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        suggestedQueriesRequest - JSON request payload to get alternative suggested queries (required)
        Returns:
        SuggestedQueriesResponse
        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 A JSON object containing a list of alternative suggested queries -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • createSuggestedQueriesHandlerWithHttpInfo

        public ApiResponse<SuggestedQueriesResponse> createSuggestedQueriesHandlerWithHttpInfo​(@NotNull
                                                                                               @NotNull String trDataset,
                                                                                               @NotNull
                                                                                               @NotNull SuggestedQueriesRequest suggestedQueriesRequest)
                                                                                        throws ApiException
        Generate suggested queries Generate suggested queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        suggestedQueriesRequest - JSON request payload to get alternative suggested queries (required)
        Returns:
        ApiResponse<SuggestedQueriesResponse>
        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 A JSON object containing a list of alternative suggested queries -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • createSuggestedQueriesHandlerAsync

        public okhttp3.Call createSuggestedQueriesHandlerAsync​(String trDataset,
                                                               SuggestedQueriesRequest suggestedQueriesRequest,
                                                               ApiCallback<SuggestedQueriesResponse> _callback)
                                                        throws ApiException
        Generate suggested queries (asynchronously) Generate suggested queries This endpoint will generate 3 suggested queries based off the query provided in the request body and return them as a JSON object.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        suggestedQueriesRequest - JSON request payload to get alternative suggested queries (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 A JSON object containing a list of alternative suggested queries -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • deleteChunkCall

        public okhttp3.Call deleteChunkCall​(String trDataset,
                                            UUID chunkId,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for deleteChunk
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (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 chunk with the id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunk

        public void deleteChunk​(String trDataset,
                                UUID chunkId)
                         throws ApiException
        Delete Chunk Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (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 chunk with the id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunkWithHttpInfo

        public ApiResponse<Void> deleteChunkWithHttpInfo​(@NotNull
                                                         @NotNull String trDataset,
                                                         @NotNull
                                                         @NotNull UUID chunkId)
                                                  throws ApiException
        Delete Chunk Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (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 chunk with the id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunkAsync

        public okhttp3.Call deleteChunkAsync​(String trDataset,
                                             UUID chunkId,
                                             ApiCallback<Void> _callback)
                                      throws ApiException
        Delete Chunk (asynchronously) Delete Chunk Delete a chunk by its id. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (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 chunk with the id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunkByTrackingIdCall

        public okhttp3.Call deleteChunkByTrackingIdCall​(String trDataset,
                                                        String trackingId,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for deleteChunkByTrackingId
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to delete (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 chunk with the tracking_id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunkByTrackingId

        public void deleteChunkByTrackingId​(String trDataset,
                                            String trackingId)
                                     throws ApiException
        Delete Chunk By Tracking Id Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to delete (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 chunk with the tracking_id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunkByTrackingIdWithHttpInfo

        public ApiResponse<Void> deleteChunkByTrackingIdWithHttpInfo​(@NotNull
                                                                     @NotNull String trDataset,
                                                                     @NotNull
                                                                     @NotNull String trackingId)
                                                              throws ApiException
        Delete Chunk By Tracking Id Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to delete (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 chunk with the tracking_id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • deleteChunkByTrackingIdAsync

        public okhttp3.Call deleteChunkByTrackingIdAsync​(String trDataset,
                                                         String trackingId,
                                                         ApiCallback<Void> _callback)
                                                  throws ApiException
        Delete Chunk By Tracking Id (asynchronously) Delete Chunk By Tracking Id Delete a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk. If deleting a root chunk which has a collision, the most recently created collision will become a new root chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to delete (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 chunk with the tracking_id specified was deleted -
        400 Service error relating to finding a chunk by tracking_id -
      • generateOffChunksCall

        public okhttp3.Call generateOffChunksCall​(String trDataset,
                                                  GenerateChunksRequest generateChunksRequest,
                                                  ApiCallback _callback)
                                           throws ApiException
        Build call for generateOffChunks
        Parameters:
        trDataset - The dataset id to use for the request (required)
        generateChunksRequest - JSON request payload to perform RAG on some chunks (chunks) (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 to updating chunk, likely due to conflicting tracking_id -
      • generateOffChunks

        public String generateOffChunks​(String trDataset,
                                        GenerateChunksRequest generateChunksRequest)
                                 throws ApiException
        RAG on Specified Chunks RAG on Specified Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        generateChunksRequest - JSON request payload to perform RAG on some chunks (chunks) (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 to updating chunk, likely due to conflicting tracking_id -
      • generateOffChunksWithHttpInfo

        public ApiResponse<String> generateOffChunksWithHttpInfo​(@NotNull
                                                                 @NotNull String trDataset,
                                                                 @NotNull
                                                                 @NotNull GenerateChunksRequest generateChunksRequest)
                                                          throws ApiException
        RAG on Specified Chunks RAG on Specified Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        generateChunksRequest - JSON request payload to perform RAG on some chunks (chunks) (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 to updating chunk, likely due to conflicting tracking_id -
      • generateOffChunksAsync

        public okhttp3.Call generateOffChunksAsync​(String trDataset,
                                                   GenerateChunksRequest generateChunksRequest,
                                                   ApiCallback<String> _callback)
                                            throws ApiException
        RAG on Specified Chunks (asynchronously) RAG on Specified Chunks This endpoint exists as an alternative to the topic+message concept where our API handles chat memory. With this endpoint, the user is responsible for providing the context window and the prompt. See more in the \"search before generate\" page at docs.trieve.ai.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        generateChunksRequest - JSON request payload to perform RAG on some chunks (chunks) (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 to updating chunk, likely due to conflicting tracking_id -
      • getChunkByIdCall

        public okhttp3.Call getChunkByIdCall​(String trDataset,
                                             UUID chunkId,
                                             ApiCallback _callback)
                                      throws ApiException
        Build call for getChunkById
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (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 chunk with the id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkById

        public ChunkMetadata getChunkById​(String trDataset,
                                          UUID chunkId)
                                   throws ApiException
        Get Chunk By Id Get Chunk By Id Get a singular chunk by id.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (required)
        Returns:
        ChunkMetadata
        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 chunk with the id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkByIdWithHttpInfo

        public ApiResponse<ChunkMetadata> getChunkByIdWithHttpInfo​(@NotNull
                                                                   @NotNull String trDataset,
                                                                   @NotNull
                                                                   @NotNull UUID chunkId)
                                                            throws ApiException
        Get Chunk By Id Get Chunk By Id Get a singular chunk by id.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (required)
        Returns:
        ApiResponse<ChunkMetadata>
        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 chunk with the id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkByIdAsync

        public okhttp3.Call getChunkByIdAsync​(String trDataset,
                                              UUID chunkId,
                                              ApiCallback<ChunkMetadata> _callback)
                                       throws ApiException
        Get Chunk By Id (asynchronously) Get Chunk By Id Get a singular chunk by id.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        chunkId - Id of the chunk you want to fetch. (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 chunk with the id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkByTrackingIdCall

        public okhttp3.Call getChunkByTrackingIdCall​(String trDataset,
                                                     String trackingId,
                                                     ApiCallback _callback)
                                              throws ApiException
        Build call for getChunkByTrackingId
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to fetch (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 chunk with the tracking_id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkByTrackingId

        public ChunkMetadata getChunkByTrackingId​(String trDataset,
                                                  String trackingId)
                                           throws ApiException
        Get Chunk By Tracking Id Get Chunk By Tracking Id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to fetch (required)
        Returns:
        ChunkMetadata
        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 chunk with the tracking_id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkByTrackingIdWithHttpInfo

        public ApiResponse<ChunkMetadata> getChunkByTrackingIdWithHttpInfo​(@NotNull
                                                                           @NotNull String trDataset,
                                                                           @NotNull
                                                                           @NotNull String trackingId)
                                                                    throws ApiException
        Get Chunk By Tracking Id Get Chunk By Tracking Id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to fetch (required)
        Returns:
        ApiResponse<ChunkMetadata>
        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 chunk with the tracking_id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getChunkByTrackingIdAsync

        public okhttp3.Call getChunkByTrackingIdAsync​(String trDataset,
                                                      String trackingId,
                                                      ApiCallback<ChunkMetadata> _callback)
                                               throws ApiException
        Get Chunk By Tracking Id (asynchronously) Get Chunk By Tracking Id Get a singular chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use your own id as the primary reference for a chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        trackingId - tracking_id of the chunk you want to fetch (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 chunk with the tracking_id that you were searching for -
        400 Service error relating to fidning a chunk by tracking_id -
      • getRecommendedChunksCall

        public okhttp3.Call getRecommendedChunksCall​(String trDataset,
                                                     RecommendChunksRequest recommendChunksRequest,
                                                     ApiCallback _callback)
                                              throws ApiException
        Build call for getRecommendedChunks
        Parameters:
        trDataset - The dataset id to use for the request (required)
        recommendChunksRequest - JSON request payload to get recommendations of chunks similar to the chunks in 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 JSON response payload containing chunks with scores which are similar to those in the request body -
        400 Service error relating to to getting similar chunks -
      • getRecommendedChunks

        public List<ChunkMetadataWithFileData> getRecommendedChunks​(String trDataset,
                                                                    RecommendChunksRequest recommendChunksRequest)
                                                             throws ApiException
        Get Recommended Chunks Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        recommendChunksRequest - JSON request payload to get recommendations of chunks similar to the chunks in the request (required)
        Returns:
        List<ChunkMetadataWithFileData>
        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 JSON response payload containing chunks with scores which are similar to those in the request body -
        400 Service error relating to to getting similar chunks -
      • getRecommendedChunksWithHttpInfo

        public ApiResponse<List<ChunkMetadataWithFileData>> getRecommendedChunksWithHttpInfo​(@NotNull
                                                                                             @NotNull String trDataset,
                                                                                             @NotNull
                                                                                             @NotNull RecommendChunksRequest recommendChunksRequest)
                                                                                      throws ApiException
        Get Recommended Chunks Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        recommendChunksRequest - JSON request payload to get recommendations of chunks similar to the chunks in the request (required)
        Returns:
        ApiResponse<List<ChunkMetadataWithFileData>>
        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 JSON response payload containing chunks with scores which are similar to those in the request body -
        400 Service error relating to to getting similar chunks -
      • getRecommendedChunksAsync

        public okhttp3.Call getRecommendedChunksAsync​(String trDataset,
                                                      RecommendChunksRequest recommendChunksRequest,
                                                      ApiCallback<List<ChunkMetadataWithFileData>> _callback)
                                               throws ApiException
        Get Recommended Chunks (asynchronously) Get Recommended Chunks Get recommendations of chunks similar to the chunks in the request. Think about this as a feature similar to the \"add to playlist\" recommendation feature on Spotify. This request pairs especially well with our groups endpoint.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        recommendChunksRequest - JSON request payload to get recommendations of chunks similar to the chunks in 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 JSON response payload containing chunks with scores which are similar to those in the request body -
        400 Service error relating to to getting similar chunks -
      • searchChunkCall

        public okhttp3.Call searchChunkCall​(String trDataset,
                                            SearchChunkData searchChunkData,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for searchChunk
        Parameters:
        trDataset - The dataset id to use for the request (required)
        searchChunkData - JSON request payload to semantically search for chunks (chunks) (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 chunks which are similar to the embedding vector of the search query -
        400 Service error relating to searching -
      • searchChunk

        public SearchChunkQueryResponseBody searchChunk​(String trDataset,
                                                        SearchChunkData searchChunkData)
                                                 throws ApiException
        Search Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        searchChunkData - JSON request payload to semantically search for chunks (chunks) (required)
        Returns:
        SearchChunkQueryResponseBody
        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 chunks which are similar to the embedding vector of the search query -
        400 Service error relating to searching -
      • searchChunkWithHttpInfo

        public ApiResponse<SearchChunkQueryResponseBody> searchChunkWithHttpInfo​(@NotNull
                                                                                 @NotNull String trDataset,
                                                                                 @NotNull
                                                                                 @NotNull SearchChunkData searchChunkData)
                                                                          throws ApiException
        Search Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        searchChunkData - JSON request payload to semantically search for chunks (chunks) (required)
        Returns:
        ApiResponse<SearchChunkQueryResponseBody>
        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 chunks which are similar to the embedding vector of the search query -
        400 Service error relating to searching -
      • searchChunkAsync

        public okhttp3.Call searchChunkAsync​(String trDataset,
                                             SearchChunkData searchChunkData,
                                             ApiCallback<SearchChunkQueryResponseBody> _callback)
                                      throws ApiException
        Search (asynchronously) Search This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b>` tags for sub-sentence highlighting.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        searchChunkData - JSON request payload to semantically search for chunks (chunks) (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 chunks which are similar to the embedding vector of the search query -
        400 Service error relating to searching -
      • updateChunkCall

        public okhttp3.Call updateChunkCall​(String trDataset,
                                            UpdateChunkData updateChunkData,
                                            ApiCallback _callback)
                                     throws ApiException
        Build call for updateChunk
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkData - JSON request payload to update a chunk (chunk) (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 No content Ok response indicating the chunk was updated as requested -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • updateChunk

        public void updateChunk​(String trDataset,
                                UpdateChunkData updateChunkData)
                         throws ApiException
        Update Chunk Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkData - JSON request payload to update a chunk (chunk) (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 No content Ok response indicating the chunk was updated as requested -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • updateChunkWithHttpInfo

        public ApiResponse<Void> updateChunkWithHttpInfo​(@NotNull
                                                         @NotNull String trDataset,
                                                         @NotNull
                                                         @NotNull UpdateChunkData updateChunkData)
                                                  throws ApiException
        Update Chunk Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkData - JSON request payload to update a chunk (chunk) (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 No content Ok response indicating the chunk was updated as requested -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • updateChunkAsync

        public okhttp3.Call updateChunkAsync​(String trDataset,
                                             UpdateChunkData updateChunkData,
                                             ApiCallback<Void> _callback)
                                      throws ApiException
        Update Chunk (asynchronously) Update Chunk Update a chunk. If you try to change the tracking_id of the chunk to have the same tracking_id as an existing chunk, the request will fail.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkData - JSON request payload to update a chunk (chunk) (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 No content Ok response indicating the chunk was updated as requested -
        400 Service error relating to to updating chunk, likely due to conflicting tracking_id -
      • updateChunkByTrackingIdCall

        public okhttp3.Call updateChunkByTrackingIdCall​(String trDataset,
                                                        UpdateChunkByTrackingIdData updateChunkByTrackingIdData,
                                                        ApiCallback _callback)
                                                 throws ApiException
        Build call for updateChunkByTrackingId
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkByTrackingIdData - JSON request payload to update a chunk by tracking_id (chunks) (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 chunk has been updated as per your request -
        400 Service error relating to to updating chunk -
      • updateChunkByTrackingId

        public void updateChunkByTrackingId​(String trDataset,
                                            UpdateChunkByTrackingIdData updateChunkByTrackingIdData)
                                     throws ApiException
        Update Chunk By Tracking Id Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkByTrackingIdData - JSON request payload to update a chunk by tracking_id (chunks) (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 chunk has been updated as per your request -
        400 Service error relating to to updating chunk -
      • updateChunkByTrackingIdWithHttpInfo

        public ApiResponse<Void> updateChunkByTrackingIdWithHttpInfo​(@NotNull
                                                                     @NotNull String trDataset,
                                                                     @NotNull
                                                                     @NotNull UpdateChunkByTrackingIdData updateChunkByTrackingIdData)
                                                              throws ApiException
        Update Chunk By Tracking Id Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkByTrackingIdData - JSON request payload to update a chunk by tracking_id (chunks) (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 chunk has been updated as per your request -
        400 Service error relating to to updating chunk -
      • updateChunkByTrackingIdAsync

        public okhttp3.Call updateChunkByTrackingIdAsync​(String trDataset,
                                                         UpdateChunkByTrackingIdData updateChunkByTrackingIdData,
                                                         ApiCallback<Void> _callback)
                                                  throws ApiException
        Update Chunk By Tracking Id (asynchronously) Update Chunk By Tracking Id Update a chunk by tracking_id. This is useful for when you are coordinating with an external system and want to use the tracking_id to identify the chunk.
        Parameters:
        trDataset - The dataset id to use for the request (required)
        updateChunkByTrackingIdData - JSON request payload to update a chunk by tracking_id (chunks) (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 chunk has been updated as per your request -
        400 Service error relating to to updating chunk -