SfapApiChatGenerationsRequestBody

Models a sfap_api chat-generations endpoint request. See https://developer.salesforce.com/docs/einstein/genai/references/models-api?meta=generateChat

The endpoint accepts a tags object in addition to messages and localization. To provide tags, subclass and introduce a new parameter of any object type named tags. Also, override the toJson method to use the subclass serializer instead of the the serializer provided by this class.

Parameters

messages

The request messages parameter value

localization

The request localization parameter value

Types

Link copied to clipboard
@Serializable
data class Locale(val locale: String, val probability: Double)
Link copied to clipboard
@Serializable
data class Localization(val defaultLocale: String, val inputLocales: Array<SfapApiChatGenerationsRequestBody.Locale>, val expectedLocales: Array<String>)
Link copied to clipboard
@Serializable
data class Message(val role: String, val content: String)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open fun toJson(): String

Encodes this request body to JSON text.