Package com.sap.ai.sdk.orchestration
Class TextItem
java.lang.Object
com.sap.ai.sdk.orchestration.TextItem
- All Implemented Interfaces:
CacheablePrompt,ContentItem
Represents a text item in a
MessageContent object.- Since:
- 1.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionCompatibility constructor conforming with the previous API to avoid breaking changesTextItem(String text, CacheControl cacheControl) Constructs text item -
Method Summary
-
Constructor Details
-
TextItem
Constructs text item- Parameters:
text- - text contentcacheControl- - nullable cache control param
-
TextItem
Compatibility constructor conforming with the previous API to avoid breaking changes- Parameters:
text- value of the item
-
-
Method Details
-
text
Compatibility method to support conversion from record to class without breaking changes, the same asgetText()- Returns:
- text
-
equals
-
hashCode
public int hashCode() -
getText
-
getCacheControl
Description copied from interface:CacheablePromptReturns cache control for a given cacheable prompt (if set)- Specified by:
getCacheControlin interfaceCacheablePrompt- Returns:
- cacheControl, nullable
-
toString
-