Package org.openapitools.client.model
Class GenerateChunksRequest
- java.lang.Object
-
- org.openapitools.client.model.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGenerateChunksRequest.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CHUNK_IDSstatic StringSERIALIZED_NAME_MODELstatic StringSERIALIZED_NAME_PREV_MESSAGESstatic StringSERIALIZED_NAME_PROMPTstatic StringSERIALIZED_NAME_STREAM_RESPONSE
-
Constructor Summary
Constructors Constructor Description GenerateChunksRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GenerateChunksRequestaddChunkIdsItem(UUID chunkIdsItem)GenerateChunksRequestaddPrevMessagesItem(ChatMessageProxy prevMessagesItem)GenerateChunksRequestchunkIds(List<UUID> chunkIds)booleanequals(Object o)static GenerateChunksRequestfromJson(String jsonString)Create an instance of GenerateChunksRequest given an JSON string@NotNull @Valid List<UUID>getChunkIds()The ids of the chunks to be retrieved and injected into the context window for RAG.StringgetModel()The model to use for the chat.@NotNull @Valid List<@Valid ChatMessageProxy>getPrevMessages()The previous messages to be placed into the chat history.StringgetPrompt()Prompt for the last message in the prev_messages array.BooleangetStreamResponse()Whether or not to stream the response.inthashCode()GenerateChunksRequestmodel(String model)GenerateChunksRequestprevMessages(List<@Valid ChatMessageProxy> prevMessages)GenerateChunksRequestprompt(String prompt)voidsetChunkIds(List<UUID> chunkIds)voidsetModel(String model)voidsetPrevMessages(List<@Valid ChatMessageProxy> prevMessages)voidsetPrompt(String prompt)voidsetStreamResponse(Boolean streamResponse)GenerateChunksRequeststreamResponse(Boolean streamResponse)StringtoJson()Convert an instance of GenerateChunksRequest to an JSON stringStringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_CHUNK_IDS
public static final String SERIALIZED_NAME_CHUNK_IDS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MODEL
public static final String SERIALIZED_NAME_MODEL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PREV_MESSAGES
public static final String SERIALIZED_NAME_PREV_MESSAGES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PROMPT
public static final String SERIALIZED_NAME_PROMPT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_STREAM_RESPONSE
public static final String SERIALIZED_NAME_STREAM_RESPONSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
chunkIds
public GenerateChunksRequest chunkIds(List<UUID> chunkIds)
-
addChunkIdsItem
public GenerateChunksRequest addChunkIdsItem(UUID chunkIdsItem)
-
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
-
model
public GenerateChunksRequest model(String model)
-
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)
-
prevMessages
public GenerateChunksRequest prevMessages(List<@Valid ChatMessageProxy> prevMessages)
-
addPrevMessagesItem
public GenerateChunksRequest addPrevMessagesItem(ChatMessageProxy prevMessagesItem)
-
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
-
setPrevMessages
public void setPrevMessages(List<@Valid ChatMessageProxy> prevMessages)
-
prompt
public GenerateChunksRequest prompt(String prompt)
-
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)
-
streamResponse
public GenerateChunksRequest streamResponse(Boolean streamResponse)
-
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)
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates 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
-
-