BuildsTextRequests
trait BuildsTextRequests
Traits
Methods
string|null
composeInstructions(string|null $instructions, array|null $schema)
Add structured output requirements to the instructions.
array
buildTextRequestBody(Provider $provider, string $model, string|null $instructions, array $messages, array $tools, array|null $schema, TextGenerationOptions|null $options)
Build the request body for the Cohere Chat API.
string|null
Details
in
ComposesSchemaInstructions at line 14
protected string|null
composeInstructions(string|null $instructions, array|null $schema)
Add structured output requirements to the instructions.
at line 22
protected array
buildTextRequestBody(Provider $provider, string $model, string|null $instructions, array $messages, array $tools, array|null $schema, TextGenerationOptions|null $options)
Build the request body for the Cohere Chat API.
at line 91
protected string|null
mapCohereToolChoice(ToolChoice $choice)
Map a tool choice to the Cohere tool_choice value.