Enum CohereChatRequest.PromptTruncation
- java.lang.Object
-
- java.lang.Enum<CohereChatRequest.PromptTruncation>
-
- com.oracle.bmc.generativeaiinference.model.CohereChatRequest.PromptTruncation
-
- All Implemented Interfaces:
BmcEnum
,Serializable
,Comparable<CohereChatRequest.PromptTruncation>
- Enclosing class:
- CohereChatRequest
public static enum CohereChatRequest.PromptTruncation extends Enum<CohereChatRequest.PromptTruncation> implements BmcEnum
Defaults to OFF.Dictates how the prompt will be constructed. With promptTruncation set to AUTO_PRESERVE_ORDER, some elements from chatHistory and documents will be dropped to construct a prompt that fits within the model’s context length limit. During this process the order of the documents and chat history will be preserved. With prompt_truncation set to OFF, no elements will be dropped.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AutoPreserveOrder
Off
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CohereChatRequest.PromptTruncation
create(String key)
String
getValue()
static CohereChatRequest.PromptTruncation
valueOf(String name)
Returns the enum constant of this type with the specified name.static CohereChatRequest.PromptTruncation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Off
public static final CohereChatRequest.PromptTruncation Off
-
AutoPreserveOrder
public static final CohereChatRequest.PromptTruncation AutoPreserveOrder
-
-
Method Detail
-
values
public static CohereChatRequest.PromptTruncation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CohereChatRequest.PromptTruncation c : CohereChatRequest.PromptTruncation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CohereChatRequest.PromptTruncation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
create
public static CohereChatRequest.PromptTruncation create(String key)
-
-