updatePrompt

fun updatePrompt(model: LLModel, prompt: Prompt): Prompt(source)

Updates a given prompt to configure structured output using the specified large language model (LLM). Depending on the model's support for structured outputs, the prompt is updated either manually or natively.

Return

A new prompt reflecting the updated structured output configuration.

Parameters

model

The large language model (LLModel) used to determine the structured output configuration.

prompt

The original prompt to be updated with the structured output configuration.