For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python function
retrieve_input_text
retrieve_input_text()โ
max.pipelines.lib.request_text.retrieve_input_text(request)
Returns the prompt text carried by request.
Accepts the three input shapes the API allows: a bare string, a message list whose first message holds a string, or a message list whose first message holds content parts (whose text parts are joined with spaces).
-
Parameters:
-
request (OpenResponsesRequest) โ The request to read the prompt from.
-
Returns:
-
The prompt text.
-
Raises:
-
ValueError โ If the request carries no text to use as a prompt.
-
Return type: