vllm.entrypoints.openai.protocol
AnyResponseFormat
module-attribute
¶
AnyResponseFormat = Union[
ResponseFormat, StructuralTagResponseFormat
]
AudioResponseFormat
module-attribute
¶
BatchRequestInputBody
module-attribute
¶
BatchRequestInputBody = Union[
ChatCompletionRequest,
EmbeddingRequest,
ScoreRequest,
RerankRequest,
]
EmbeddingRequest
module-attribute
¶
EmbeddingRequest = Union[
EmbeddingCompletionRequest, EmbeddingChatRequest
]
LogitsProcessors
module-attribute
¶
LogitsProcessors = list[
Union[str, LogitsProcessorConstructor]
]
PoolingRequest
module-attribute
¶
PoolingRequest = Union[
PoolingCompletionRequest, PoolingChatRequest
]
TokenizeRequest
module-attribute
¶
TokenizeRequest = Union[
TokenizeCompletionRequest, TokenizeChatRequest
]
BatchRequestInput
¶
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
check_type_for_url
classmethod
¶
check_type_for_url(value: Any, info: ValidationInfo)
Source code in vllm/entrypoints/openai/protocol.py
BatchRequestOutput
¶
Bases: OpenAIBaseModel
The per-line object of the batch output and error files
Source code in vllm/entrypoints/openai/protocol.py
BatchResponseData
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
body
class-attribute
instance-attribute
¶
body: Optional[
Union[
ChatCompletionResponse,
EmbeddingResponse,
ScoreResponse,
RerankResponse,
]
] = None
ChatCompletionLogProb
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ChatCompletionLogProbs
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
content
class-attribute
instance-attribute
¶
content: Optional[list[ChatCompletionLogProbsContent]] = (
None
)
ChatCompletionLogProbsContent
¶
Bases: ChatCompletionLogProb
Source code in vllm/entrypoints/openai/protocol.py
ChatCompletionNamedFunction
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ChatCompletionNamedToolChoiceParam
¶
ChatCompletionRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
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 531 532 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 |
|
_DEFAULT_SAMPLING_PARAMS
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,
}
add_generation_prompt
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.",
)
add_special_tokens
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).",
)
allowed_token_ids
class-attribute
instance-attribute
¶
cache_salt
class-attribute
instance-attribute
¶
cache_salt: Optional[str] = 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.",
)
chat_template
class-attribute
instance-attribute
¶
chat_template: Optional[str] = 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.",
)
chat_template_kwargs
class-attribute
instance-attribute
¶
chat_template_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
)
continue_final_message
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`.',
)
documents
class-attribute
instance-attribute
¶
documents: Optional[list[dict[str, str]]] = 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.',
)
echo
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.",
)
guided_choice
class-attribute
instance-attribute
¶
guided_choice: Optional[list[str]] = Field(
default=None,
description="If specified, the output will be exactly one of the choices.",
)
guided_decoding_backend
class-attribute
instance-attribute
¶
guided_decoding_backend: Optional[str] = Field(
default=None,
description="If specified, will override the default guided decoding backend of the server for this specific request. If set, must be either 'outlines' / 'lm-format-enforcer'",
)
guided_grammar
class-attribute
instance-attribute
¶
guided_grammar: Optional[str] = Field(
default=None,
description="If specified, the output will follow the context free grammar.",
)
guided_json
class-attribute
instance-attribute
¶
guided_json: Optional[Union[str, dict, BaseModel]] = Field(
default=None,
description="If specified, the output will follow the JSON schema.",
)
guided_regex
class-attribute
instance-attribute
¶
guided_regex: Optional[str] = Field(
default=None,
description="If specified, the output will follow the regex pattern.",
)
guided_whitespace_pattern
class-attribute
instance-attribute
¶
guided_whitespace_pattern: Optional[str] = Field(
default=None,
description="If specified, will override the default whitespace pattern for guided json decoding.",
)
include_stop_str_in_output
class-attribute
instance-attribute
¶
include_stop_str_in_output: bool = False
kv_transfer_params
class-attribute
instance-attribute
¶
kv_transfer_params: Optional[dict[str, Any]] = Field(
default=None,
description="KVTransfer parameters used for disaggregated serving.",
)
logits_processors
class-attribute
instance-attribute
¶
logits_processors: Optional[LogitsProcessors] = 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'}}.",
)
max_completion_tokens
class-attribute
instance-attribute
¶
max_tokens
class-attribute
instance-attribute
¶
max_tokens: Optional[int] = Field(
default=None,
deprecated="max_tokens is deprecated in favor of the max_completion_tokens field",
)
mm_processor_kwargs
class-attribute
instance-attribute
¶
mm_processor_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional kwargs to pass to the HF processor.",
)
parallel_tool_calls
class-attribute
instance-attribute
¶
priority
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.",
)
request_id
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.",
)
response_format
class-attribute
instance-attribute
¶
response_format: Optional[AnyResponseFormat] = None
return_tokens_as_token_ids
class-attribute
instance-attribute
¶
return_tokens_as_token_ids: Optional[bool] = 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.",
)
spaces_between_special_tokens
class-attribute
instance-attribute
¶
spaces_between_special_tokens: bool = True
structural_tag
class-attribute
instance-attribute
¶
structural_tag: Optional[str] = Field(
default=None,
description="If specified, the output will follow the structural tag schema.",
)
tool_choice
class-attribute
instance-attribute
¶
tool_choice: Optional[
Union[
Literal["none"],
Literal["auto"],
Literal["required"],
ChatCompletionNamedToolChoiceParam,
]
] = "none"
truncate_prompt_tokens
class-attribute
instance-attribute
¶
vllm_xargs
class-attribute
instance-attribute
¶
vllm_xargs: Optional[dict[str, Union[str, int, float]]] = (
Field(
default=None,
description="Additional request parameters with string or numeric values, used by custom extensions.",
)
)
_get_guided_json_from_tool
¶
Source code in vllm/entrypoints/openai/protocol.py
check_cache_salt_support
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
check_generation_prompt
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
check_guided_decoding_count
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
check_logprobs
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
check_tool_usage
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
to_beam_search_params
¶
to_beam_search_params(
max_tokens: int, default_sampling_params: dict
) -> BeamSearchParams
Source code in vllm/entrypoints/openai/protocol.py
to_sampling_params
¶
to_sampling_params(
max_tokens: int,
logits_processor_pattern: Optional[str],
default_sampling_params: dict,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
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 |
|
validate_stream_options
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
ChatCompletionResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"chatcmpl-{random_uuid()}"
)
kv_transfer_params
class-attribute
instance-attribute
¶
kv_transfer_params: Optional[dict[str, Any]] = Field(
default=None, description="KVTransfer parameters."
)
prompt_logprobs
class-attribute
instance-attribute
¶
service_tier
class-attribute
instance-attribute
¶
ChatCompletionResponseChoice
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ChatCompletionResponseStreamChoice
¶
ChatCompletionStreamResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ChatCompletionToolsParam
¶
ChatMessage
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ClassificationData
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ClassificationRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
priority
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.",
)
truncate_prompt_tokens
class-attribute
instance-attribute
¶
ClassificationResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"classify-{random_uuid()}"
)
CompletionLogProbs
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
CompletionRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
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 1097 1098 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 |
|
_DEFAULT_SAMPLING_PARAMS
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,
}
add_special_tokens
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.",
)
allowed_token_ids
class-attribute
instance-attribute
¶
cache_salt
class-attribute
instance-attribute
¶
cache_salt: Optional[str] = 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.",
)
guided_choice
class-attribute
instance-attribute
¶
guided_choice: Optional[list[str]] = Field(
default=None,
description="If specified, the output will be exactly one of the choices.",
)
guided_decoding_backend
class-attribute
instance-attribute
¶
guided_decoding_backend: Optional[str] = Field(
default=None,
description="If specified, will override the default guided decoding backend of the server for this specific request. If set, must be one of 'outlines' / 'lm-format-enforcer'",
)
guided_grammar
class-attribute
instance-attribute
¶
guided_grammar: Optional[str] = Field(
default=None,
description="If specified, the output will follow the context free grammar.",
)
guided_json
class-attribute
instance-attribute
¶
guided_json: Optional[Union[str, dict, BaseModel]] = Field(
default=None,
description="If specified, the output will follow the JSON schema.",
)
guided_regex
class-attribute
instance-attribute
¶
guided_regex: Optional[str] = Field(
default=None,
description="If specified, the output will follow the regex pattern.",
)
guided_whitespace_pattern
class-attribute
instance-attribute
¶
guided_whitespace_pattern: Optional[str] = Field(
default=None,
description="If specified, will override the default whitespace pattern for guided json decoding.",
)
include_stop_str_in_output
class-attribute
instance-attribute
¶
include_stop_str_in_output: bool = False
kv_transfer_params
class-attribute
instance-attribute
¶
kv_transfer_params: Optional[dict[str, Any]] = Field(
default=None,
description="KVTransfer parameters used for disaggregated serving.",
)
logits_processors
class-attribute
instance-attribute
¶
logits_processors: Optional[LogitsProcessors] = 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'}}.",
)
priority
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.",
)
prompt
class-attribute
instance-attribute
¶
prompt_embeds
class-attribute
instance-attribute
¶
response_format
class-attribute
instance-attribute
¶
response_format: Optional[AnyResponseFormat] = 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.",
)
return_tokens_as_token_ids
class-attribute
instance-attribute
¶
return_tokens_as_token_ids: Optional[bool] = 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.",
)
spaces_between_special_tokens
class-attribute
instance-attribute
¶
spaces_between_special_tokens: bool = True
truncate_prompt_tokens
class-attribute
instance-attribute
¶
vllm_xargs
class-attribute
instance-attribute
¶
vllm_xargs: Optional[dict[str, Union[str, int, float]]] = (
Field(
default=None,
description="Additional request parameters with string or numeric values, used by custom extensions.",
)
)
check_cache_salt_support
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
check_guided_decoding_count
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
check_logprobs
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
to_beam_search_params
¶
to_beam_search_params(
max_tokens: int,
default_sampling_params: Optional[dict] = None,
) -> BeamSearchParams
Source code in vllm/entrypoints/openai/protocol.py
to_sampling_params
¶
to_sampling_params(
max_tokens: int,
logits_processor_pattern: Optional[str],
default_sampling_params: Optional[dict] = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 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 |
|
validate_prompt_and_prompt_embeds
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
validate_stream_options
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
CompletionResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"cmpl-{random_uuid()}"
)
kv_transfer_params
class-attribute
instance-attribute
¶
kv_transfer_params: Optional[dict[str, Any]] = Field(
default=None, description="KVTransfer parameters."
)
service_tier
class-attribute
instance-attribute
¶
CompletionResponseChoice
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
prompt_logprobs
class-attribute
instance-attribute
¶
CompletionResponseStreamChoice
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
CompletionStreamResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"cmpl-{random_uuid()}"
)
DeltaFunctionCall
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
DeltaMessage
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
tool_calls
class-attribute
instance-attribute
¶
tool_calls: list[DeltaToolCall] = Field(
default_factory=list
)
DeltaToolCall
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
DetokenizeRequest
¶
DetokenizeResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
EmbeddingChatRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
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 |
|
add_special_tokens
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).",
)
chat_template
class-attribute
instance-attribute
¶
chat_template: Optional[str] = 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.",
)
chat_template_kwargs
class-attribute
instance-attribute
¶
chat_template_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
)
encoding_format
class-attribute
instance-attribute
¶
encoding_format: Literal['float', 'base64'] = 'float'
mm_processor_kwargs
class-attribute
instance-attribute
¶
mm_processor_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional kwargs to pass to the HF processor.",
)
priority
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.",
)
truncate_prompt_tokens
class-attribute
instance-attribute
¶
check_generation_prompt
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
EmbeddingCompletionRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
add_special_tokens
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.",
)
encoding_format
class-attribute
instance-attribute
¶
encoding_format: Literal['float', 'base64'] = 'float'
priority
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.",
)
truncate_prompt_tokens
class-attribute
instance-attribute
¶
EmbeddingResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"embd-{random_uuid()}"
)
EmbeddingResponseData
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ErrorResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ExtractedToolCallInformation
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
FunctionCall
¶
FunctionDefinition
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
JsonSchemaResponseFormat
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
json_schema
class-attribute
instance-attribute
¶
LoadLoRAAdapterRequest
¶
LogitsProcessorConstructor
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
ModelCard
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
permission
class-attribute
instance-attribute
¶
permission: list[ModelPermission] = Field(
default_factory=list
)
ModelList
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
ModelPermission
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"modelperm-{random_uuid()}"
)
OpenAIBaseModel
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
__log_extra_fields__
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
PoolingResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"pool-{random_uuid()}"
)
PoolingResponseData
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
PromptTokenUsageInfo
¶
RequestResponseMetadata
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
RerankDocument
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
RerankRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
mm_processor_kwargs
class-attribute
instance-attribute
¶
mm_processor_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional kwargs to pass to the HF processor.",
)
priority
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.",
)
truncate_prompt_tokens
class-attribute
instance-attribute
¶
RerankResponse
¶
RerankResult
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
RerankUsage
¶
ResponseFormat
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
json_schema
class-attribute
instance-attribute
¶
json_schema: Optional[JsonSchemaResponseFormat] = None
ResponseReasoningItem
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"rs_{random_uuid()}"
)
ResponsesRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 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 |
|
_DEFAULT_SAMPLING_PARAMS
class-attribute
instance-attribute
¶
cache_salt
class-attribute
instance-attribute
¶
cache_salt: Optional[str] = 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.",
)
include
class-attribute
instance-attribute
¶
include: Optional[
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
mm_processor_kwargs
class-attribute
instance-attribute
¶
mm_processor_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional kwargs to pass to the HF processor.",
)
previous_response_id
class-attribute
instance-attribute
¶
priority
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.",
)
request_id
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.",
)
service_tier
class-attribute
instance-attribute
¶
service_tier: Literal[
"auto", "default", "flex", "scale", "priority"
] = "auto"
truncation
class-attribute
instance-attribute
¶
check_cache_salt_support
¶
Source code in vllm/entrypoints/openai/protocol.py
to_sampling_params
¶
to_sampling_params(
default_max_tokens: int,
default_sampling_params: Optional[dict] = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
validate_background
¶
Source code in vllm/entrypoints/openai/protocol.py
ResponsesResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 |
|
created_at
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"resp_{random_uuid()}"
)
previous_response_id
class-attribute
instance-attribute
¶
service_tier
instance-attribute
¶
service_tier: Literal[
"auto", "default", "flex", "scale", "priority"
]
from_request
classmethod
¶
from_request(
request: ResponsesRequest,
sampling_params: SamplingParams,
model_name: str,
created_time: int,
output: list[ResponseOutputItem],
status: ResponseStatus,
usage: Optional[UsageInfo] = None,
) -> ResponsesResponse
Source code in vllm/entrypoints/openai/protocol.py
ScoreRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
mm_processor_kwargs
class-attribute
instance-attribute
¶
mm_processor_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional kwargs to pass to the HF processor.",
)
priority
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.",
)
truncate_prompt_tokens
class-attribute
instance-attribute
¶
ScoreResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
created
class-attribute
instance-attribute
¶
id
class-attribute
instance-attribute
¶
id: str = Field(
default_factory=lambda: f"embd-{random_uuid()}"
)
ScoreResponseData
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
StreamOptions
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
StructuralTag
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
StructuralTagResponseFormat
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TokenizeChatRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 |
|
add_generation_prompt
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.",
)
add_special_tokens
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).",
)
chat_template
class-attribute
instance-attribute
¶
chat_template: Optional[str] = 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.",
)
chat_template_kwargs
class-attribute
instance-attribute
¶
chat_template_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional keyword args to pass to the template renderer. Will be accessible by the chat template.",
)
continue_final_message
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`.',
)
mm_processor_kwargs
class-attribute
instance-attribute
¶
mm_processor_kwargs: Optional[dict[str, Any]] = Field(
default=None,
description="Additional kwargs to pass to the HF processor.",
)
return_token_strs
class-attribute
instance-attribute
¶
return_token_strs: Optional[bool] = Field(
default=False,
description="If true, also return the token strings corresponding to the token ids.",
)
tools
class-attribute
instance-attribute
¶
tools: Optional[list[ChatCompletionToolsParam]] = Field(
default=None,
description="A list of tools the model may call.",
)
check_generation_prompt
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
TokenizeCompletionRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TokenizeResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TokenizerInfoResponse
¶
Bases: OpenAIBaseModel
Response containing tokenizer configuration equivalent to tokenizer_config.json
Source code in vllm/entrypoints/openai/protocol.py
ToolCall
¶
TranscriptionRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 |
|
_DEFAULT_SAMPLING_PARAMS
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,
}
file
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.
frequency_penalty
class-attribute
instance-attribute
¶
The frequency penalty to use for sampling.
language
class-attribute
instance-attribute
¶
The language of the input audio.
Supplying the input language in ISO-639-1 format will improve accuracy and latency.
min_p
class-attribute
instance-attribute
¶
Filters out tokens with a probability lower than min_p
, ensuring a
minimum likelihood threshold during sampling.
presence_penalty
class-attribute
instance-attribute
¶
The presence penalty to use for sampling.
prompt
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.
repetition_penalty
class-attribute
instance-attribute
¶
The repetition penalty to use for sampling.
response_format
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
.
seed
class-attribute
instance-attribute
¶
The seed to use for sampling.
stream
class-attribute
instance-attribute
¶
When set, it will enable output to be streamed in a similar fashion as the Chat Completion endpoint.
stream_continuous_usage_stats
class-attribute
instance-attribute
¶
stream_include_usage
class-attribute
instance-attribute
¶
temperature
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.
timestamp_granularities
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.
top_k
class-attribute
instance-attribute
¶
Limits sampling to the k
most probable tokens at each step.
top_p
class-attribute
instance-attribute
¶
Enables nucleus (top-p) sampling, where tokens are selected from the
smallest possible set whose cumulative probability exceeds p
.
vllm_xargs
class-attribute
instance-attribute
¶
vllm_xargs: Optional[dict[str, Union[str, int, float]]] = (
Field(
default=None,
description="Additional request parameters with string or numeric values, used by custom extensions.",
)
)
to_sampling_params
¶
to_sampling_params(
default_max_tokens: int,
default_sampling_params: Optional[dict] = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
validate_transcription_request
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
TranscriptionResponse
¶
TranscriptionResponseStreamChoice
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TranscriptionResponseVerbose
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
segments
class-attribute
instance-attribute
¶
segments: Optional[list[TranscriptionSegment]] = None
Segments of the transcribed text and their corresponding details.
words
class-attribute
instance-attribute
¶
words: Optional[list[TranscriptionWord]] = None
Extracted words and their corresponding timestamps.
TranscriptionSegment
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
avg_logprob
instance-attribute
¶
avg_logprob: float
Average logprob of the segment.
If the value is lower than -1, consider the logprobs failed.
compression_ratio
instance-attribute
¶
compression_ratio: float
Compression ratio of the segment.
If the value is greater than 2.4, consider the compression failed.
no_speech_prob
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.
TranscriptionStreamResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TranscriptionWord
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TranslationRequest
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 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 |
|
_DEFAULT_SAMPLING_PARAMS
class-attribute
instance-attribute
¶
_DEFAULT_SAMPLING_PARAMS: dict = {'temperature': 0}
file
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.
language
class-attribute
instance-attribute
¶
The language of the input audio we translate from.
Supplying the input language in ISO-639-1 format will improve accuracy.
prompt
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.
response_format
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
.
stream
class-attribute
instance-attribute
¶
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.
stream_continuous_usage_stats
class-attribute
instance-attribute
¶
stream_include_usage
class-attribute
instance-attribute
¶
temperature
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.
to_sampling_params
¶
to_sampling_params(
default_max_tokens: int,
default_sampling_params: Optional[dict] = None,
) -> SamplingParams
Source code in vllm/entrypoints/openai/protocol.py
validate_stream_options
classmethod
¶
Source code in vllm/entrypoints/openai/protocol.py
TranslationResponse
¶
TranslationResponseStreamChoice
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TranslationResponseVerbose
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
segments
class-attribute
instance-attribute
¶
segments: Optional[list[TranslationSegment]] = None
Segments of the translated text and their corresponding details.
words
class-attribute
instance-attribute
¶
words: Optional[list[TranslationWord]] = None
Extracted words and their corresponding timestamps.
TranslationSegment
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
avg_logprob
instance-attribute
¶
avg_logprob: float
Average logprob of the segment.
If the value is lower than -1, consider the logprobs failed.
compression_ratio
instance-attribute
¶
compression_ratio: float
Compression ratio of the segment.
If the value is greater than 2.4, consider the compression failed.
no_speech_prob
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.
TranslationStreamResponse
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
TranslationWord
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
UnloadLoRAAdapterRequest
¶
Bases: BaseModel
Source code in vllm/entrypoints/openai/protocol.py
UsageInfo
¶
Bases: OpenAIBaseModel
Source code in vllm/entrypoints/openai/protocol.py
prompt_tokens_details
class-attribute
instance-attribute
¶
prompt_tokens_details: Optional[PromptTokenUsageInfo] = None
get_logits_processors
¶
get_logits_processors(
processors: Optional[LogitsProcessors],
pattern: Optional[str],
) -> Optional[list[Any]]