support multiimage inference

Former-commit-id: 8083e4607549e805eb308c4e93c8aa256202f438
This commit is contained in:
hiyouga
2024-11-01 07:25:20 +00:00
parent a63e624eca
commit 8cea5cd967
7 changed files with 103 additions and 63 deletions

View File

@@ -141,7 +141,14 @@ class WebChatModel(ChatModel):
chatbot[-1][1] = ""
response = ""
for new_text in self.stream_chat(
messages, system, tools, image, video, max_new_tokens=max_new_tokens, top_p=top_p, temperature=temperature
messages,
system,
tools,
images=[image],
videos=[video],
max_new_tokens=max_new_tokens,
top_p=top_p,
temperature=temperature,
):
response += new_text
if tools: