Skip to main content
Version: 0.7.x

Function: getStructuredOutputPrompt()

getStructuredOutputPrompt<T>(responseSchema): string

Defined in: packages/react-native-executorch/src/utils/llm.ts:64

Generates a structured output prompt based on the provided schema.

Type Parameters

T

T extends $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

Parameters

responseSchema

The schema (Zod or JSON Schema) defining the desired output format.

T | Schema

Returns

string

A prompt string instructing the model to format its output according to the given schema.