vllm.entrypoints.responses_utils ¶
construct_chat_message_with_tool_call ¶
construct_chat_message_with_tool_call(
item: ResponseInputOutputItem,
) -> ChatCompletionMessageParam
Source code in vllm/entrypoints/responses_utils.py
construct_input_messages ¶
construct_input_messages(
*,
request_instructions: str | None = None,
request_input: str | list[ResponseInputOutputItem],
prev_msg: list[ChatCompletionMessageParam]
| None = None,
prev_response_output: list[ResponseOutputItem]
| None = None,
)
Source code in vllm/entrypoints/responses_utils.py
convert_tool_responses_to_completions_format ¶
Convert a flat tool schema
{"type": "function", "name": "...", "description": "...", "parameters": {...}}
into: {"type": "function", "function": {...}}
Source code in vllm/entrypoints/responses_utils.py
extract_tool_types ¶
Extracts the tool types from the given tools.