Safety Generation Types#

struct Message#

Public Members

std::string role#
std::vector<MessageContent> contents#
struct MessageContent#

Public Members

std::string type#

“text” or “image”; image bytes are supplied through imageBuffers.

std::string content#
struct MessageContent

Public Members

std::string type

“text” or “image”; image bytes are supplied through imageBuffers.

std::string content
struct ImageData#

Borrowed, tightly packed RGB UINT8 host pixels; storage outlives handleRequest().

Public Members

uint8_t const *data = {nullptr}#
std::size_t sizeInBytes = {0}#
int32_t width = {0}#
int32_t height = {0}#
struct LLMGenerationRequest#

Caller prepares input containers before handleRequest(); the runtime only reads them. The initial InternVL recipe admits one request with one image and uses greedy decoding.

Public Members

std::vector<Request> requests#
int64_t maxGenerateLength = {0}#
struct Request#

Public Members

std::vector<Message> messages#
std::vector<ImageData> imageBuffers#
struct Request

Public Members

std::vector<Message> messages
std::vector<ImageData> imageBuffers
struct LLMGenerationResponse#

Caller sizes the outer vectors to one and reserves token/text capacity before handleRequest(). Operational processing writes within that capacity; outputs are valid only on success.

Public Members

std::vector<std::vector<int32_t>> outputIds#
std::vector<std::string> outputTexts#