trait BuildsTextRequests

Methods

array
buildStepBody(Provider $provider, string $model, string|null $instructions, array $messages, array $tools, array|null $schema, TextGenerationOptions|null $options, StepContext $stepContext)

Build the request body for the current text generation step.

array
buildResponseFormat(array $schema, bool $strict)

Build the response format options for structured output.

Details

at line 20
protected array buildStepBody(Provider $provider, string $model, string|null $instructions, array $messages, array $tools, array|null $schema, TextGenerationOptions|null $options, StepContext $stepContext)

Build the request body for the current text generation step.

Parameters

Provider $provider
string $model
string|null $instructions
array $messages
array $tools
array|null $schema
TextGenerationOptions|null $options
StepContext $stepContext

Return Value

array

at line 70
protected array buildResponseFormat(array $schema, bool $strict)

Build the response format options for structured output.

Parameters

array $schema
bool $strict

Return Value

array