Skip to content

Commit

Permalink
remove duplicated conversion; distincwish vision model
Browse files Browse the repository at this point in the history
  • Loading branch information
liunux4odoo committed Jan 15, 2025
1 parent 23c0fc8 commit c5d7e08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion xinference/model/llm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def get_full_context(
tokenize=False,
**kwargs,
):
messages = self.convert_messages_with_content_list_to_str_conversion(messages)
if "vision" not in self.model_family.model_ability:
messages = self.convert_messages_with_content_list_to_str_conversion(messages)
if tokenizer is not None:
try:
full_context = tokenizer.apply_chat_template(
Expand Down
1 change: 0 additions & 1 deletion xinference/model/llm/vllm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,6 @@ async def async_chat(
generate_config: Optional[Dict] = None,
request_id: Optional[str] = None,
) -> Union[ChatCompletion, AsyncGenerator[ChatCompletionChunk, None]]:
messages = self.convert_messages_with_content_list_to_str_conversion(messages)
tools = generate_config.pop("tools", []) if generate_config else None
model_family = self.model_family.model_family or self.model_family.model_name
full_context_kwargs = {}
Expand Down

0 comments on commit c5d7e08

Please sign in to comment.