MCPcopy Index your code
hub / github.com/simstudioai/sim / generateSchemaInstructions

Function generateSchemaInstructions

apps/sim/providers/utils.ts:370–380  ·  view source on GitHub ↗
(schema: any, schemaName?: string)

Source from the content-addressed store, hash-verified

368 * Used as a fallback when native structured outputs are not supported.
369 */
370export function generateSchemaInstructions(schema: any, schemaName?: string): string {
371 const name = schemaName || 'response'
372 return `IMPORTANT: You must respond with a valid JSON object that conforms to the following schema.
373Do not include any text before or after the JSON object. Only output the JSON.
374
375Schema name: ${name}
376JSON Schema:
377${JSON.stringify(schema, null, 2)}
378
379Your response must be valid JSON that exactly matches this schema structure.`
380}
381
382export function generateStructuredOutputInstructions(responseFormat: any): string {
383 if (!responseFormat) return ''

Callers 5

applyResponseFormatFunction · 0.90
applyJsonResponseFormatFunction · 0.90
applyResponseFormatFunction · 0.90
applyResponseFormatFunction · 0.90
applyResponseFormatFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected