MapsMessages
trait MapsMessages
Methods
Map the given Hypervel messages to OpenAI Responses API input format.
Map a user message to OpenAI format.
Map an assistant message to OpenAI format.
Remove file_search_call items, which the API resolves by id and so rejects when store is false.
Map a tool call to a function_call input item, keeping the item id only when OpenAI issued it and its reasoning survived.
Map a tool result message to OpenAI format.
Details
at line 21
protected array
mapMessagesToInput(array $messages, string|null $instructions, Provider $provider)
Map the given Hypervel messages to OpenAI Responses API input format.
at line 48
protected void
mapUserMessage(UserMessage|Message $message, array $input, Provider $provider)
Map a user message to OpenAI format.
at line 67
protected void
mapAssistantMessage(AssistantMessage|Message $message, array $input, Provider $provider)
Map an assistant message to OpenAI format.
at line 126
protected array
withoutStoredOnlyItems(array $blocks)
Remove file_search_call items, which the API resolves by id and so rejects when store is false.
at line 139
protected array
functionCallItem(ToolCall $toolCall)
Map a tool call to a function_call input item, keeping the item id only when OpenAI issued it and its reasoning survived.
at line 154
protected void
mapToolResultMessage(ToolResultMessage|Message $message, array $input)
Map a tool result message to OpenAI format.