Class ChatCompletionRequestMessageContentPartText
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionRequestMessageContentPartText
- All Implemented Interfaces:
ChatCompletionRequestAssistantMessageContentPart,ChatCompletionRequestUserMessageContentPart
public class ChatCompletionRequestMessageContentPartText
extends Object
implements ChatCompletionRequestAssistantMessageContentPart, ChatCompletionRequestUserMessageContentPart
ChatCompletionRequestMessageContentPartText
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe type of the content part. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theChatCompletionRequestMessageContentPartText.getText()The text content.getType()The type of the content part.inthashCode()voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisChatCompletionRequestMessageContentPartTextinstance.voidSet the text of thisChatCompletionRequestMessageContentPartTextinstance.voidSet the type of thisChatCompletionRequestMessageContentPartTextinstance.Set the text of thisChatCompletionRequestMessageContentPartTextinstance and return the same instance.toMap()Get the value of all properties of thisChatCompletionRequestMessageContentPartTextinstance including unrecognized properties.toString()Set the type of thisChatCompletionRequestMessageContentPartTextinstance and return the same instance.
-
Constructor Details
-
ChatCompletionRequestMessageContentPartText
public ChatCompletionRequestMessageContentPartText()
-
-
Method Details
-
type
@Nonnull public ChatCompletionRequestMessageContentPartText type(@Nonnull ChatCompletionRequestMessageContentPartText.TypeEnum type) Set the type of thisChatCompletionRequestMessageContentPartTextinstance and return the same instance.- Parameters:
type- The type of the content part.- Returns:
- The same instance of this
ChatCompletionRequestMessageContentPartTextclass
-
getType
The type of the content part.- Returns:
- type The type of this
ChatCompletionRequestMessageContentPartTextinstance.
-
setType
Set the type of thisChatCompletionRequestMessageContentPartTextinstance.- Parameters:
type- The type of the content part.
-
text
Set the text of thisChatCompletionRequestMessageContentPartTextinstance and return the same instance.- Parameters:
text- The text content.- Returns:
- The same instance of this
ChatCompletionRequestMessageContentPartTextclass
-
getText
The text content.- Returns:
- text The text of this
ChatCompletionRequestMessageContentPartTextinstance.
-
setText
Set the text of thisChatCompletionRequestMessageContentPartTextinstance.- Parameters:
text- The text content.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theChatCompletionRequestMessageContentPartText.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisChatCompletionRequestMessageContentPartTextinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisChatCompletionRequestMessageContentPartTextinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisChatCompletionRequestMessageContentPartTextinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
toMap()instead.