File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1616
1717from vllm import version
1818
19+ from ...conftest import LocalAssetServer
1920from ...utils import RemoteOpenAIServer
2021
2122MODELS = {
@@ -69,7 +70,6 @@ async def client(server):
6970
7071
7172_PROMPT = "Hello my name is Robert and I love magic"
72- _IMAGE_URL = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
7373
7474
7575def _get_expected_values (num_requests : int , prompt_ids : list [int ], max_tokens : int ):
@@ -250,6 +250,7 @@ async def test_metrics_counts(
250250
251251@pytest .mark .asyncio
252252async def test_metrics_exist (
253+ local_asset_server : LocalAssetServer ,
253254 server : RemoteOpenAIServer ,
254255 client : openai .AsyncClient ,
255256 model_key : str ,
@@ -265,13 +266,21 @@ async def test_metrics_exist(
265266 temperature = 0.0 ,
266267 )
267268 else :
269+ # https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg
268270 await client .chat .completions .create (
269271 model = model_name ,
270272 messages = [
271273 {
272274 "role" : "user" ,
273275 "content" : [
274- {"type" : "image_url" , "image_url" : {"url" : _IMAGE_URL }},
276+ {
277+ "type" : "image_url" ,
278+ "image_url" : {
279+ "url" : local_asset_server .url_for (
280+ "2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
281+ ),
282+ },
283+ },
275284 {"type" : "text" , "text" : "What's in this image?" },
276285 ],
277286 }
You can’t perform that action at this time.
0 commit comments