Package org.openapitools.client.model
Class CreateTopicData
- java.lang.Object
-
- org.openapitools.client.model.CreateTopicData
-
@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 CreateTopicData extends Object
CreateTopicData
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateTopicData.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_FIRST_USER_MESSAGEstatic StringSERIALIZED_NAME_MODELstatic StringSERIALIZED_NAME_NAME
-
Constructor Summary
Constructors Constructor Description CreateTopicData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)CreateTopicDatafirstUserMessage(String firstUserMessage)static CreateTopicDatafromJson(String jsonString)Create an instance of CreateTopicData given an JSON stringStringgetFirstUserMessage()The first message which will belong to the topic.StringgetModel()The model to use for the assistant's messages.StringgetName()The name of the topic.inthashCode()CreateTopicDatamodel(String model)CreateTopicDataname(String name)voidsetFirstUserMessage(String firstUserMessage)voidsetModel(String model)voidsetName(String name)StringtoJson()Convert an instance of CreateTopicData 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_FIRST_USER_MESSAGE
public static final String SERIALIZED_NAME_FIRST_USER_MESSAGE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MODEL
public static final String SERIALIZED_NAME_MODEL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
firstUserMessage
public CreateTopicData firstUserMessage(String firstUserMessage)
-
getFirstUserMessage
@Nullable public String getFirstUserMessage()
The first message which will belong to the topic. The topic name is generated based on this message similar to how it works in the OpenAI chat UX if a name is not explicitly provided on the name request body key.- Returns:
- firstUserMessage
-
setFirstUserMessage
public void setFirstUserMessage(String firstUserMessage)
-
model
public CreateTopicData model(String model)
-
getModel
@Nullable public String getModel()
The model to use for the assistant's messages. This can be any model from the openrouter model list. If no model is provided, the gpt-3.5-turbo will be used.- Returns:
- model
-
setModel
public void setModel(String model)
-
name
public CreateTopicData name(String name)
-
getName
@Nullable public String getName()
The name of the topic. If this is not provided, the topic name is generated from the first_user_message.- Returns:
- name
-
setName
public void setName(String name)
-
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 CreateTopicData
-
fromJson
public static CreateTopicData fromJson(String jsonString) throws IOException
Create an instance of CreateTopicData given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CreateTopicData
- Throws:
IOException- if the JSON string is invalid with respect to CreateTopicData
-
toJson
public String toJson()
Convert an instance of CreateTopicData to an JSON string- Returns:
- JSON string
-
-