vllm.renderers.inputs.preprocess ¶
Schemas and utilites for preprocessing inputs.
DecoderDictPrompt module-attribute ¶
DecoderDictPrompt: TypeAlias = TextPrompt | TokensPrompt
A DecoderPrompt that has been standardized into a dictionary.
DecoderOnlyDictPrompt module-attribute ¶
DecoderOnlyDictPrompt: TypeAlias = (
TextPrompt | TokensPrompt | EmbedsPrompt
)
A DecoderOnlyPrompt that has been standardized into a dictionary.
DictPrompt module-attribute ¶
DictPrompt: TypeAlias = (
DecoderOnlyDictPrompt | EncoderDecoderDictPrompt
)
A PromptType that has been standardized into a dictionary.
EncoderDictPrompt module-attribute ¶
EncoderDictPrompt: TypeAlias = TextPrompt | TokensPrompt
A EncoderPrompt that has been standardized into a dictionary.
SingletonDictPrompt module-attribute ¶
SingletonDictPrompt: TypeAlias = (
DecoderOnlyDictPrompt
| EncoderDictPrompt
| DecoderDictPrompt
)
A SingletonPrompt that has been standardized into a dictionary.
EncoderDecoderDictPrompt ¶
Bases: TypedDict
A EncoderDecoderPrompt that has been standardized into a dictionary.
Source code in vllm/renderers/inputs/preprocess.py
parse_dec_only_prompt ¶
parse_dec_only_prompt(
prompt: object,
) -> DecoderOnlyDictPrompt
Parse a prompt for a decoder-only model and normalize it to a dictionary.
Source code in vllm/renderers/inputs/preprocess.py
parse_enc_dec_prompt ¶
parse_enc_dec_prompt(
prompt: object,
) -> EncoderDecoderDictPrompt
Parse a prompt for an encoder-decoder model and normalize it to a dictionary.