Skip to content

Commit

Permalink
[python] Use vllm chat object
Browse files Browse the repository at this point in the history
  • Loading branch information
xyang16 committed Jan 16, 2025
1 parent eb9ff28 commit 16a51fd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions engines/python/setup/djl_python/input_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,22 @@ def parse_text_inputs_params(request_input: TextInput, input_item: Input,
if configs is not None:
is_bedrock = configs.bedrock_compat
if is_chat_completions_request(input_map):
if type(kwargs.get("rolling_batch")).__name__ == "TRTLLMRollingBatch":
inputs, param = parse_chat_completions_request(
if type(kwargs.get("rolling_batch")).__name__ in [
"LmiDistRollingBatch", "VLLMRollingBatch"
]:
inputs, param = parse_chat_completions_request_vllm(
input_map,
kwargs.get("is_rolling_batch"),
kwargs.get("rolling_batch"),
tokenizer,
image_token=image_token,
configs=configs,
is_mistral_tokenizer=is_mistral_tokenizer,
)
else:
inputs, param = parse_chat_completions_request_vllm(
inputs, param = parse_chat_completions_request(
input_map,
kwargs.get("is_rolling_batch"),
kwargs.get("rolling_batch"),
tokenizer,
image_token=image_token,
configs=configs,
Expand Down

0 comments on commit 16a51fd

Please sign in to comment.