module-attribute  ¶
 AnyResponseFormat: TypeAlias = (
    ResponseFormat
    | StructuralTagResponseFormat
    | LegacyStructuralTagResponseFormat
)
 module-attribute  ¶
 AnyStructuralTagResponseFormat: TypeAlias = (
    LegacyStructuralTagResponseFormat
    | StructuralTagResponseFormat
)
 module-attribute  ¶
   module-attribute  ¶
 BatchRequestInputBody: TypeAlias = (
    ChatCompletionRequest
    | EmbeddingRequest
    | ScoreRequest
    | RerankRequest
)
 module-attribute  ¶
 EmbeddingRequest: TypeAlias = (
    EmbeddingCompletionRequest | EmbeddingChatRequest
)
 module-attribute  ¶
 PoolingRequest: TypeAlias = (
    PoolingCompletionRequest
    | PoolingChatRequest
    | IOProcessorRequest
)
 module-attribute  ¶
 ResponseInputOutputItem: TypeAlias = (
    ResponseInputItemParam
    | ResponseReasoningItem
    | ResponseFunctionToolCall
)
 module-attribute  ¶
 StreamingResponsesResponse: TypeAlias = (
    ResponseCreatedEvent
    | ResponseInProgressEvent
    | ResponseCompletedEvent
    | ResponseOutputItemAddedEvent
    | ResponseOutputItemDoneEvent
    | ResponseContentPartAddedEvent
    | ResponseContentPartDoneEvent
    | ResponseReasoningTextDeltaEvent
    | ResponseReasoningTextDoneEvent
    | ResponseReasoningPartAddedEvent
    | ResponseReasoningPartDoneEvent
    | ResponseCodeInterpreterCallInProgressEvent
    | ResponseCodeInterpreterCallCodeDeltaEvent
    | ResponseWebSearchCallInProgressEvent
    | ResponseWebSearchCallSearchingEvent
    | ResponseWebSearchCallCompletedEvent
    | ResponseCodeInterpreterCallCodeDoneEvent
    | ResponseCodeInterpreterCallInterpretingEvent
    | ResponseCodeInterpreterCallCompletedEvent
)
 module-attribute  ¶
 TokenizeRequest: TypeAlias = (
    TokenizeCompletionRequest | TokenizeChatRequest
)
 
  Bases: OpenAIBaseModel
The per-line object of the batch input file.
NOTE: Currently only the /v1/chat/completions endpoint is supported.
Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
 check_type_for_url(value: Any, info: ValidationInfo)
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
The per-line object of the batch output and error files
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 body: (
    ChatCompletionResponse
    | EmbeddingResponse
    | ScoreResponse
    | RerankResponse
    | None
) = None
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
 content: list[ChatCompletionLogProbsContent] | None = None
 
  Bases: ChatCompletionLogProb
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 |  | 
 class-attribute instance-attribute  ¶
 _DEFAULT_SAMPLING_PARAMS: dict = {
    "repetition_penalty": 1.0,
    "temperature": 1.0,
    "top_p": 1.0,
    "top_k": 0,
    "min_p": 0.0,
}
 class-attribute instance-attribute  ¶
 add_generation_prompt: bool = Field(
    default=True,
    description="If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.",
)
 class-attribute instance-attribute  ¶
 add_special_tokens: bool = Field(
    default=False,
    description="If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to false (as is the default).",
)
 class-attribute instance-attribute  ¶
 cache_salt: str | None = Field(
    default=None,
    description="If specified, the prefix cache will be salted with the provided string to prevent an attacker to guess prompts in multi-user environments. The salt should be random, protected from access by 3rd parties, and long enough to be unpredictable (e.g., 43 characters base64-encoded, corresponding to 256 bit). Not supported by vLLM engine V0.",
)
 class-attribute instance-attribute  ¶
 chat_template: str | None = Field(
    default=None,
    description="A Jinja template to use for this conversion. As of transformers v4.44, default chat template is no longer allowed, so you must provide a chat template if the tokenizer does not define one.",
)
 class-attribute instance-attribute  ¶
 chat_template_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
)
 class-attribute instance-attribute  ¶
 continue_final_message: bool = Field(
    default=False,
    description='If this is set, the chat will be formatted so that the final message in the chat is open-ended, without any EOS tokens. The model will continue this message rather than starting a new one. This allows you to "prefill" part of the model\'s response for it. Cannot be used at the same time as `add_generation_prompt`.',
)
 class-attribute instance-attribute  ¶
 documents: list[dict[str, str]] | None = Field(
    default=None,
    description='A list of dicts representing documents that will be accessible to the model if it is performing RAG (retrieval-augmented generation). If the template does not support RAG, this argument will have no effect. We recommend that each document should be a dict containing "title" and "text" keys.',
)
 class-attribute instance-attribute  ¶
 echo: bool = Field(
    default=False,
    description="If true, the new message will be prepended with the last message if they belong to the same role.",
)
 class-attribute instance-attribute  ¶
 guided_choice: list[str] | None = Field(
    default=None,
    description="`guided_choice` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `choice` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_decoding_backend: str | None = Field(
    default=None,
    description="`guided_decoding_backend` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please remove it from your request.",
)
 class-attribute instance-attribute  ¶
 guided_grammar: str | None = Field(
    default=None,
    description="`guided_grammar` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `grammar` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_json: str | dict | BaseModel | None = Field(
    default=None,
    description="`guided_json` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `json` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_regex: str | None = Field(
    default=None,
    description="`guided_regex` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `regex` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_whitespace_pattern: str | None = Field(
    default=None,
    description="`guided_whitespace_pattern` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `whitespace_pattern` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 include_stop_str_in_output: bool = False
 class-attribute instance-attribute  ¶
 kv_transfer_params: dict[str, Any] | None = Field(
    default=None,
    description="KVTransfer parameters used for disaggregated serving.",
)
 class-attribute instance-attribute  ¶
 logits_processors: LogitsProcessors | None = Field(
    default=None,
    description="A list of either qualified names of logits processors, or constructor objects, to apply when sampling. A constructor is a JSON object with a required 'qualname' field specifying the qualified name of the processor class/factory, and optional 'args' and 'kwargs' fields containing positional and keyword arguments. For example: {'qualname': 'my_module.MyLogitsProcessor', 'args': [1, 2], 'kwargs': {'param': 'value'}}.",
)
 class-attribute instance-attribute  ¶
 max_tokens: int | None = Field(
    default=None,
    deprecated="max_tokens is deprecated in favor of the max_completion_tokens field",
)
 class-attribute instance-attribute  ¶
 mm_processor_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional kwargs to pass to the HF processor.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 reasoning_effort: (
    Literal["low", "medium", "high"] | None
) = None
 class-attribute instance-attribute  ¶
 request_id: str = Field(
    default_factory=lambda: f"{random_uuid()}",
    description="The request_id related to this request. If the caller does not set it, a random_uuid will be generated. This id is used through out the inference process and return in response.",
)
 class-attribute instance-attribute  ¶
 response_format: AnyResponseFormat | None = None
 class-attribute instance-attribute  ¶
 return_token_ids: bool | None = Field(
    default=None,
    description="If specified, the result will include token IDs alongside the generated text. In streaming mode, prompt_token_ids is included only in the first chunk, and token_ids contains the delta tokens for each chunk. This is useful for debugging or when you need to map generated text back to input tokens.",
)
 class-attribute instance-attribute  ¶
 return_tokens_as_token_ids: bool | None = Field(
    default=None,
    description="If specified with 'logprobs', tokens are represented  as strings of the form 'token_id:{token_id}' so that tokens that are not JSON-encodable can be identified.",
)
 class-attribute instance-attribute  ¶
 spaces_between_special_tokens: bool = True
 class-attribute instance-attribute  ¶
 structural_tag: str | None = Field(
    default=None,
    description="`structural_tag` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `structural_tag` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 structured_outputs: StructuredOutputsParams | None = Field(
    default=None,
    description="Additional kwargs for structured outputs",
)
 class-attribute instance-attribute  ¶
 tool_choice: (
    Literal["none"]
    | Literal["auto"]
    | Literal["required"]
    | ChatCompletionNamedToolChoiceParam
    | None
) = "none"
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 vllm_xargs: dict[str, str | int | float] | None = Field(
    default=None,
    description="Additional request parameters with string or numeric values, used by custom extensions.",
)
 classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
 | 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |  | 
 
 to_beam_search_params(
    max_tokens: int, default_sampling_params: dict
) -> BeamSearchParams
Source code in vllm/entrypoints/openai/protocol.py
  
 to_sampling_params(
    max_tokens: int,
    logits_processor_pattern: str | None,
    default_sampling_params: dict,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 |  | 
 classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"chatcmpl-{random_uuid()}"
)
 class-attribute instance-attribute  ¶
 kv_transfer_params: dict[str, Any] | None = Field(
    default=None, description="KVTransfer parameters."
)
 class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 activation: bool | None = Field(
    default=None,
    description="activation will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 softmax: bool | None = Field(
    default=None,
    description="softmax will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 truncate_prompt_tokens: int | None = None
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"classify-{random_uuid()}"
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 |  | 
 class-attribute instance-attribute  ¶
 _DEFAULT_SAMPLING_PARAMS: dict = {
    "repetition_penalty": 1.0,
    "temperature": 1.0,
    "top_p": 1.0,
    "top_k": 0,
    "min_p": 0.0,
}
 class-attribute instance-attribute  ¶
 add_special_tokens: bool = Field(
    default=True,
    description="If true (the default), special tokens (e.g. BOS) will be added to the prompt.",
)
 class-attribute instance-attribute  ¶
 cache_salt: str | None = Field(
    default=None,
    description="If specified, the prefix cache will be salted with the provided string to prevent an attacker to guess prompts in multi-user environments. The salt should be random, protected from access by 3rd parties, and long enough to be unpredictable (e.g., 43 characters base64-encoded, corresponding to 256 bit). Not supported by vLLM engine V0.",
)
 class-attribute instance-attribute  ¶
 guided_choice: list[str] | None = Field(
    default=None,
    description="`guided_choice` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `choice` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_decoding_backend: str | None = Field(
    default=None,
    description="`guided_decoding_backend` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please remove it from your request.",
)
 class-attribute instance-attribute  ¶
 guided_grammar: str | None = Field(
    default=None,
    description="`guided_grammar` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `grammar` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_json: str | dict | BaseModel | None = Field(
    default=None,
    description="`guided_json` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `json` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_regex: str | None = Field(
    default=None,
    description="`guided_regex` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `regex` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 guided_whitespace_pattern: str | None = Field(
    default=None,
    description="`guided_whitespace_pattern` is deprecated. This will be removed in v0.12.0 or v1.0.0, whichever is soonest. Please pass `whitespace_pattern` to `structured_outputs` instead.",
)
 class-attribute instance-attribute  ¶
 include_stop_str_in_output: bool = False
 class-attribute instance-attribute  ¶
 kv_transfer_params: dict[str, Any] | None = Field(
    default=None,
    description="KVTransfer parameters used for disaggregated serving.",
)
 class-attribute instance-attribute  ¶
 logits_processors: LogitsProcessors | None = Field(
    default=None,
    description="A list of either qualified names of logits processors, or constructor objects, to apply when sampling. A constructor is a JSON object with a required 'qualname' field specifying the qualified name of the processor class/factory, and optional 'args' and 'kwargs' fields containing positional and keyword arguments. For example: {'qualname': 'my_module.MyLogitsProcessor', 'args': [1, 2], 'kwargs': {'param': 'value'}}.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 request_id: str = Field(
    default_factory=lambda: f"{random_uuid()}",
    description="The request_id related to this request. If the caller does not set it, a random_uuid will be generated. This id is used through out the inference process and return in response.",
)
 class-attribute instance-attribute  ¶
 response_format: AnyResponseFormat | None = Field(
    default=None,
    description="Similar to chat completion, this parameter specifies the format of output. Only {'type': 'json_object'}, {'type': 'json_schema'}, {'type': 'structural_tag'}, or {'type': 'text' } is supported.",
)
 class-attribute instance-attribute  ¶
 return_token_ids: bool | None = Field(
    default=None,
    description="If specified, the result will include token IDs alongside the generated text. In streaming mode, prompt_token_ids is included only in the first chunk, and token_ids contains the delta tokens for each chunk. This is useful for debugging or when you need to map generated text back to input tokens.",
)
 class-attribute instance-attribute  ¶
 return_tokens_as_token_ids: bool | None = Field(
    default=None,
    description="If specified with 'logprobs', tokens are represented  as strings of the form 'token_id:{token_id}' so that tokens that are not JSON-encodable can be identified.",
)
 class-attribute instance-attribute  ¶
 spaces_between_special_tokens: bool = True
 class-attribute instance-attribute  ¶
 structural_tag: str | None = Field(
    default=None,
    description="If specified, the output will follow the structural tag schema.",
)
 class-attribute instance-attribute  ¶
 structured_outputs: StructuredOutputsParams | None = Field(
    default=None,
    description="Additional kwargs for structured outputs",
)
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 vllm_xargs: dict[str, str | int | float] | None = Field(
    default=None,
    description="Additional request parameters with string or numeric values, used by custom extensions.",
)
 classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  
 to_beam_search_params(
    max_tokens: int,
    default_sampling_params: dict | None = None,
) -> BeamSearchParams
Source code in vllm/entrypoints/openai/protocol.py
  
 to_sampling_params(
    max_tokens: int,
    logits_processor_pattern: str | None,
    default_sampling_params: dict | None = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
 | 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 |  | 
 classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"cmpl-{random_uuid()}"
)
 class-attribute instance-attribute  ¶
 kv_transfer_params: dict[str, Any] | None = Field(
    default=None, description="KVTransfer parameters."
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"cmpl-{random_uuid()}"
)
 
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
 tool_calls: list[DeltaToolCall] = Field(
    default_factory=list
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 |  | 
 class-attribute instance-attribute  ¶
 add_generation_prompt: bool = Field(
    default=False,
    description="If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.",
)
 class-attribute instance-attribute  ¶
 add_special_tokens: bool = Field(
    default=False,
    description="If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to false (as is the default).",
)
 class-attribute instance-attribute  ¶
 chat_template: str | None = Field(
    default=None,
    description="A Jinja template to use for this conversion. As of transformers v4.44, default chat template is no longer allowed, so you must provide a chat template if the tokenizer does not define one.",
)
 class-attribute instance-attribute  ¶
 chat_template_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
)
 class-attribute instance-attribute  ¶
 embed_dtype: EmbedDType = Field(
    default="float32",
    description="What dtype to use for encoding. Default to using float32 for base64 encoding to match the OpenAI python client behavior. This parameter will affect base64 and binary_response.",
)
 class-attribute instance-attribute  ¶
 endianness: Endianness = Field(
    default="native",
    description="What endianness to use for encoding. Default to using native for base64 encoding to match the OpenAI python client behavior.This parameter will affect base64 and binary_response.",
)
 class-attribute instance-attribute  ¶
 mm_processor_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional kwargs to pass to the HF processor.",
)
 class-attribute instance-attribute  ¶
 normalize: bool | None = Field(
    default=None,
    description="Whether to normalize the embeddings outputs. Default is True.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 request_id: str = Field(
    default_factory=lambda: f"{random_uuid()}",
    description="The request_id related to this request. If the caller does not set it, a random_uuid will be generated. This id is used through out the inference process and return in response.",
)
 class-attribute instance-attribute  ¶
   classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 |  | 
 class-attribute instance-attribute  ¶
 add_special_tokens: bool = Field(
    default=True,
    description="If true (the default), special tokens (e.g. BOS) will be added to the prompt.",
)
 class-attribute instance-attribute  ¶
 embed_dtype: EmbedDType = Field(
    default="float32",
    description="What dtype to use for encoding. Default to using float32 for base64 encoding to match the OpenAI python client behavior. This parameter will affect base64 and binary_response.",
)
 class-attribute instance-attribute  ¶
 endianness: Endianness = Field(
    default="native",
    description="What endianness to use for encoding. Default to using native for base64 encoding to match the OpenAI python client behavior.This parameter will affect base64 and binary_response.",
)
 class-attribute instance-attribute  ¶
 normalize: bool | None = Field(
    default=None,
    description="Whether to normalize the embeddings outputs. Default is True.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 request_id: str = Field(
    default_factory=lambda: f"{random_uuid()}",
    description="The request_id related to this request. If the caller does not set it, a random_uuid will be generated. This id is used through out the inference process and return in response.",
)
 class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"embd-{random_uuid()}"
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel, Generic[T]
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 embed_dtype: EmbedDType = Field(
    default="float32",
    description="What dtype to use for encoding. Default to using float32 for base64 encoding to match the OpenAI python client behavior. This parameter will affect base64 and binary_response.",
)
 class-attribute instance-attribute  ¶
 endianness: Endianness = Field(
    default="native",
    description="What endianness to use for encoding. Default to using native for base64 encoding to match the OpenAI python client behavior.This parameter will affect base64 and binary_response.",
)
 
  Bases: OpenAIBaseModel, Generic[T]
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
   
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 permission: list[ModelPermission] = Field(
    default_factory=list
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"modelperm-{random_uuid()}"
)
 
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: EmbeddingChatRequest
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 activation: bool | None = Field(
    default=None,
    description="activation will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 softmax: bool | None = Field(
    default=None,
    description="softmax will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 use_activation: bool | None = Field(
    default=None,
    description="Whether to use activation for classification outputs. If it is a classify or token_classify task, the default is True; for other tasks, this value should be None.",
)
 
    
  Bases: EmbeddingCompletionRequest
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 activation: bool | None = Field(
    default=None,
    description="activation will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 softmax: bool | None = Field(
    default=None,
    description="softmax will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 use_activation: bool | None = Field(
    default=None,
    description="Whether to use activation for classification outputs. If it is a classify or token_classify task, the default is True; for other tasks, this value should be None.",
)
 
    
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"pool-{random_uuid()}"
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 activation: bool | None = Field(
    default=None,
    description="activation will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 mm_processor_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional kwargs to pass to the HF processor.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 softmax: bool | None = Field(
    default=None,
    description="softmax will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
   
   
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
   
  Bases: ResponseCompletedEvent
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: ResponseCreatedEvent
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
 json_schema: JsonSchemaResponseFormat | None = None
 
  Bases: ResponseInProgressEvent
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |  | 
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 cache_salt: str | None = Field(
    default=None,
    description="If specified, the prefix cache will be salted with the provided string to prevent an attacker to guess prompts in multi-user environments. The salt should be random, protected from access by 3rd parties, and long enough to be unpredictable (e.g., 43 characters base64-encoded, corresponding to 256 bit). Not supported by vLLM engine V0.",
)
 class-attribute instance-attribute  ¶
 enable_response_messages: bool = Field(
    default=False,
    description="Dictates whether or not to return messages as part of the response object. Currently only supported fornon-background and gpt-oss only. ",
)
 class-attribute instance-attribute  ¶
 include: (
    list[
        Literal[
            "code_interpreter_call.outputs",
            "computer_call_output.output.image_url",
            "file_search_call.results",
            "message.input_image.image_url",
            "message.output_text.logprobs",
            "reasoning.encrypted_content",
        ],
    ]
    | None
) = None
 class-attribute instance-attribute  ¶
 mm_processor_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional kwargs to pass to the HF processor.",
)
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 request_id: str = Field(
    default_factory=lambda: f"resp_{random_uuid()}",
    description="The request_id related to this request. If the caller does not set it, a random_uuid will be generated. This id is used through out the inference process and return in response.",
)
 class-attribute instance-attribute  ¶
 service_tier: Literal[
    "auto", "default", "flex", "scale", "priority"
] = "auto"
 class-attribute instance-attribute  ¶
 truncation: Literal['auto', 'disabled'] | None = 'disabled'
 
  Source code in vllm/entrypoints/openai/protocol.py
  
  Parse function_call dictionaries into ResponseFunctionToolCall objects. This ensures Pydantic can properly resolve union types in the input field. Function calls provided as dicts are converted to ResponseFunctionToolCall objects before validation, while invalid structures are left for Pydantic to reject with appropriate error messages.
Source code in vllm/entrypoints/openai/protocol.py
  
 is_include_output_logprobs() -> bool
Check if the request includes output logprobs.
Source code in vllm/entrypoints/openai/protocol.py
   
 to_sampling_params(
    default_max_tokens: int,
    default_sampling_params: dict | None = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
  
  Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 |  | 
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"resp_{random_uuid()}"
)
 class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 input_messages: list[ChatCompletionMessageParam] | None = (
    None
)
 class-attribute instance-attribute  ¶
 output_messages: list[ChatCompletionMessageParam] | None = (
    None
)
 instance-attribute  ¶
 service_tier: Literal[
    "auto", "default", "flex", "scale", "priority"
]
 classmethod  ¶
 from_request(
    request: ResponsesRequest,
    sampling_params: SamplingParams,
    model_name: str,
    created_time: int,
    output: list[ResponseOutputItem],
    status: ResponseStatus,
    usage: ResponseUsage | None = None,
    input_messages: list[ChatCompletionMessageParam]
    | None = None,
    output_messages: list[ChatCompletionMessageParam]
    | None = None,
) -> ResponsesResponse
Source code in vllm/entrypoints/openai/protocol.py
  
    
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 activation: bool | None = Field(
    default=None,
    description="activation will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
 mm_processor_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional kwargs to pass to the HF processor.",
)
 class-attribute instance-attribute  ¶
 priority: int = Field(
    default=0,
    description="The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.",
)
 class-attribute instance-attribute  ¶
 softmax: bool | None = Field(
    default=None,
    description="softmax will be deprecated, please use use_activation instead.",
)
 class-attribute instance-attribute  ¶
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
   class-attribute instance-attribute  ¶
 id: str = Field(
    default_factory=lambda: f"embd-{random_uuid()}"
)
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 |  | 
 class-attribute instance-attribute  ¶
 add_generation_prompt: bool = Field(
    default=True,
    description="If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.",
)
 class-attribute instance-attribute  ¶
 add_special_tokens: bool = Field(
    default=False,
    description="If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to false (as is the default).",
)
 class-attribute instance-attribute  ¶
 chat_template: str | None = Field(
    default=None,
    description="A Jinja template to use for this conversion. As of transformers v4.44, default chat template is no longer allowed, so you must provide a chat template if the tokenizer does not define one.",
)
 class-attribute instance-attribute  ¶
 chat_template_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
)
 class-attribute instance-attribute  ¶
 continue_final_message: bool = Field(
    default=False,
    description='If this is set, the chat will be formatted so that the final message in the chat is open-ended, without any EOS tokens. The model will continue this message rather than starting a new one. This allows you to "prefill" part of the model\'s response for it. Cannot be used at the same time as `add_generation_prompt`.',
)
 class-attribute instance-attribute  ¶
 mm_processor_kwargs: dict[str, Any] | None = Field(
    default=None,
    description="Additional kwargs to pass to the HF processor.",
)
 class-attribute instance-attribute  ¶
 return_token_strs: bool | None = Field(
    default=False,
    description="If true, also return the token strings corresponding to the token ids.",
)
 class-attribute instance-attribute  ¶
 tools: list[ChatCompletionToolsParam] | None = Field(
    default=None,
    description="A list of tools the model may call.",
)
 classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Response containing tokenizer configuration equivalent to tokenizer_config.json
Source code in vllm/entrypoints/openai/protocol.py
   
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 |  | 
 class-attribute instance-attribute  ¶
 _DEFAULT_SAMPLING_PARAMS: dict = {
    "repetition_penalty": 1.0,
    "temperature": 1.0,
    "top_p": 1.0,
    "top_k": 0,
    "min_p": 0.0,
}
 instance-attribute  ¶
  The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
 class-attribute instance-attribute  ¶
 frequency_penalty: float | None = 0.0
The frequency penalty to use for sampling.
 class-attribute instance-attribute  ¶
 language: str | None = None
The language of the input audio.
Supplying the input language in ISO-639-1 format will improve accuracy and latency.
 class-attribute instance-attribute  ¶
 min_p: float | None = None
Filters out tokens with a probability lower than min_p, ensuring a minimum likelihood threshold during sampling.
 class-attribute instance-attribute  ¶
 presence_penalty: float | None = 0.0
The presence penalty to use for sampling.
 class-attribute instance-attribute  ¶
 prompt: str = Field(default='')
An optional text to guide the model's style or continue a previous audio segment.
The prompt should match the audio language.
 class-attribute instance-attribute  ¶
 repetition_penalty: float | None = None
The repetition penalty to use for sampling.
 class-attribute instance-attribute  ¶
 response_format: AudioResponseFormat = Field(default="json")
The format of the output, in one of these options: json, text, srt, verbose_json, or vtt.
 class-attribute instance-attribute  ¶
 seed: int | None = Field(None, ge=min, le=max)
The seed to use for sampling.
 class-attribute instance-attribute  ¶
 stream: bool | None = False
When set, it will enable output to be streamed in a similar fashion as the Chat Completion endpoint.
 class-attribute instance-attribute  ¶
 stream_continuous_usage_stats: bool | None = False
 class-attribute instance-attribute  ¶
 temperature: float = Field(default=0.0)
The sampling temperature, between 0 and 1.
Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused / deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
 class-attribute instance-attribute  ¶
 timestamp_granularities: list[
    Literal["word", "segment"]
] = Field(alias="timestamp_granularities[]", default=[])
The timestamp granularities to populate for this transcription.
response_format must be set verbose_json to use timestamp granularities. Either or both of these options are supported: word, or segment. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.
 class-attribute instance-attribute  ¶
 to_language: str | None = None
The language of the output audio we transcribe to.
Please note that this is not currently used by supported models at this time, but it is a placeholder for future use, matching translation api.
 class-attribute instance-attribute  ¶
 top_k: int | None = None
Limits sampling to the k most probable tokens at each step.
 class-attribute instance-attribute  ¶
 top_p: float | None = None
Enables nucleus (top-p) sampling, where tokens are selected from the smallest possible set whose cumulative probability exceeds p.
 class-attribute instance-attribute  ¶
 vllm_xargs: dict[str, str | int | float] | None = Field(
    default=None,
    description="Additional request parameters with string or numeric values, used by custom extensions.",
)
 
 to_sampling_params(
    default_max_tokens: int,
    default_sampling_params: dict | None = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 segments: list[TranscriptionSegment] | None = None
Segments of the transcribed text and their corresponding details.
 class-attribute instance-attribute  ¶
 words: list[TranscriptionWord] | None = None
Extracted words and their corresponding timestamps.
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  instance-attribute  ¶
 avg_logprob: float
Average logprob of the segment.
If the value is lower than -1, consider the logprobs failed.
 instance-attribute  ¶
 compression_ratio: float
Compression ratio of the segment.
If the value is greater than 2.4, consider the compression failed.
 instance-attribute  ¶
 no_speech_prob: float
Probability of no speech in the segment.
If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
 | 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 |  | 
 class-attribute instance-attribute  ¶
 _DEFAULT_SAMPLING_PARAMS: dict = {'temperature': 0}
 instance-attribute  ¶
  The audio file object (not file name) to translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
 class-attribute instance-attribute  ¶
 language: str | None = None
The language of the input audio we translate from.
Supplying the input language in ISO-639-1 format will improve accuracy.
 class-attribute instance-attribute  ¶
 prompt: str = Field(default='')
An optional text to guide the model's style or continue a previous audio segment.
The prompt should match the audio language.
 class-attribute instance-attribute  ¶
 response_format: AudioResponseFormat = Field(default="json")
The format of the output, in one of these options: json, text, srt, verbose_json, or vtt.
 class-attribute instance-attribute  ¶
 seed: int | None = Field(None, ge=min, le=max)
The seed to use for sampling.
 class-attribute instance-attribute  ¶
 stream: bool | None = False
Custom field not present in the original OpenAI definition. When set, it will enable output to be streamed in a similar fashion as the Chat Completion endpoint.
 class-attribute instance-attribute  ¶
 stream_continuous_usage_stats: bool | None = False
 class-attribute instance-attribute  ¶
 temperature: float = Field(default=0.0)
The sampling temperature, between 0 and 1.
Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused / deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
 class-attribute instance-attribute  ¶
 to_language: str | None = None
The language of the input audio we translate to.
Please note that this is not supported by all models, refer to the specific model documentation for more details. For instance, Whisper only supports to_language=en.
 
 to_sampling_params(
    default_max_tokens: int,
    default_sampling_params: dict | None = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
  classmethod  ¶
  Source code in vllm/entrypoints/openai/protocol.py
  
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  class-attribute instance-attribute  ¶
 segments: list[TranslationSegment] | None = None
Segments of the translated text and their corresponding details.
 class-attribute instance-attribute  ¶
 words: list[TranslationWord] | None = None
Extracted words and their corresponding timestamps.
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  instance-attribute  ¶
 avg_logprob: float
Average logprob of the segment.
If the value is lower than -1, consider the logprobs failed.
 instance-attribute  ¶
 compression_ratio: float
Compression ratio of the segment.
If the value is greater than 2.4, consider the compression failed.
 instance-attribute  ¶
 no_speech_prob: float
Probability of no speech in the segment.
If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.
 
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
  
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
   
  Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
   class-attribute instance-attribute  ¶
 prompt_tokens_details: PromptTokenUsageInfo | None = None
 
 get_logits_processors(
    processors: LogitsProcessors | None, pattern: str | None
) -> list[Any] | None
Source code in vllm/entrypoints/openai/protocol.py
  
  Serializes a single message