Update chat.py

This commit is contained in:
marko1616 2024-08-22 12:24:34 +08:00 committed by GitHub
parent a4f1de9d82
commit 8eb2092921
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import io
import json
import os
import uuid
import numpy
import numpy as np
from typing import TYPE_CHECKING, AsyncGenerator, Dict, List, Optional, Tuple
from ..data import Role as DataRole
@ -113,7 +113,7 @@ def _process_request(
else: # web uri
image_path = requests.get(image_url, stream=True).raw
image = numpy.array(Image.open(image_path).convert("RGB"))
image = np.array(Image.open(image_path).convert("RGB"))
else:
input_messages.append({"role": ROLE_MAPPING[message.role], "content": message.content})