Class GenerateChunksRequest


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               date="2024-03-29T12:34:27.506198300-05:00[America/Chicago]",
               comments="Generator version: 7.4.0")
    public class GenerateChunksRequest
    extends Object
    GenerateChunksRequest
    • Constructor Detail

      • GenerateChunksRequest

        public GenerateChunksRequest()
    • Method Detail

      • getChunkIds

        @Nonnull
        @NotNull
        @Valid
        public @NotNull @Valid List<UUID> getChunkIds()
        The ids of the chunks to be retrieved and injected into the context window for RAG.
        Returns:
        chunkIds
      • setChunkIds

        public void setChunkIds​(List<UUID> chunkIds)
      • getModel

        @Nullable
        public String getModel()
        The model to use for the chat. This can be any model from the openrouter model list. If no model is provided, gpt-3.5-turbo will be used.
        Returns:
        model
      • setModel

        public void setModel​(String model)
      • getPrevMessages

        @Nonnull
        @NotNull
        @Valid
        public @NotNull @Valid List<@Valid ChatMessageProxy> getPrevMessages()
        The previous messages to be placed into the chat history. The last message in this array will be the prompt for the model to inference on. The length of this array must be at least 1.
        Returns:
        prevMessages
      • getPrompt

        @Nullable
        public String getPrompt()
        Prompt for the last message in the prev_messages array. This will be used to generate the next message in the chat. The default is 'Respond to the instruction and include the doc numbers that you used in square brackets at the end of the sentences that you used the docs for:'. You can also specify an empty string to leave the final message alone such that your user's final message can be used as the prompt. See docs.trieve.ai or contact us for more information.
        Returns:
        prompt
      • setPrompt

        public void setPrompt​(String prompt)
      • getStreamResponse

        @Nullable
        public Boolean getStreamResponse()
        Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true.
        Returns:
        streamResponse
      • setStreamResponse

        public void setStreamResponse​(Boolean streamResponse)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonElement

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates the JSON Element and throws an exception if issues found
        Parameters:
        jsonElement - JSON Element
        Throws:
        IOException - if the JSON Element is invalid with respect to GenerateChunksRequest
      • fromJson

        public static GenerateChunksRequest fromJson​(String jsonString)
                                              throws IOException
        Create an instance of GenerateChunksRequest given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of GenerateChunksRequest
        Throws:
        IOException - if the JSON string is invalid with respect to GenerateChunksRequest
      • toJson

        public String toJson()
        Convert an instance of GenerateChunksRequest to an JSON string
        Returns:
        JSON string