Skip to content

Commit 5ffde38

Browse files
committed
do not log base64
1 parent 2f30530 commit 5ffde38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/server/tests/unit/test_vision_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def create_server():
2424
[
2525
# test model is trained on CIFAR-10, but it's quite dumb due to small size
2626
(IMG_URL_0, True, "(cat)+"),
27-
(IMG_BASE64_0, True, "(cat)+"),
27+
("IMG_BASE64_0", True, "(cat)+"), # exceptional, so that we don't cog up the log
2828
(IMG_URL_1, True, "(frog)+"),
2929
("malformed", False, None),
3030
("https://google.com/404", False, None), # non-existent image
@@ -34,6 +34,8 @@ def create_server():
3434
def test_vision_chat_completion(image_url, success, re_content):
3535
global server
3636
server.start(timeout_seconds=60) # vision model may take longer to load due to download size
37+
if image_url == "IMG_BASE64_0":
38+
image_url = IMG_BASE64_0
3739
res = server.make_request("POST", "/chat/completions", data={
3840
"temperature": 0.0,
3941
"top_k": 1,

0 commit comments

Comments
 (0)