fix an index error

This commit is contained in:
shaobo 2024-07-11 23:27:15 +08:00
parent 0963521071
commit feaa9d6b23

View File

@ -59,7 +59,7 @@ class CodegeexChatModel:
try:
response, _ = self.model.chat(
self.tokenizer,
query=request.messages[0].content,
query=request.messages[-1].content,
history=[msg.model_dump() for msg in request.messages[:-1]],
max_new_tokens=request.max_tokens,
temperature=request.temperature,