mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-03 12:42:17 +00:00
fix provider model list test
This commit is contained in:
parent
73215460ba
commit
f3cca7d61a
1 changed files with 6 additions and 5 deletions
|
|
@ -31,7 +31,7 @@ from llama_stack.apis.inference import (
|
||||||
ToolChoice,
|
ToolChoice,
|
||||||
UserMessage,
|
UserMessage,
|
||||||
)
|
)
|
||||||
from llama_stack.apis.models import Model
|
from llama_stack.apis.models import ListModelsResponse, Model
|
||||||
|
|
||||||
from .utils import group_chunks
|
from .utils import group_chunks
|
||||||
|
|
||||||
|
|
@ -92,12 +92,13 @@ class TestInference:
|
||||||
async def test_model_list(self, inference_model, inference_stack):
|
async def test_model_list(self, inference_model, inference_stack):
|
||||||
_, models_impl = inference_stack
|
_, models_impl = inference_stack
|
||||||
response = await models_impl.list_models()
|
response = await models_impl.list_models()
|
||||||
assert isinstance(response, list)
|
assert isinstance(response, ListModelsResponse)
|
||||||
assert len(response) >= 1
|
assert isinstance(response.data, list)
|
||||||
assert all(isinstance(model, Model) for model in response)
|
assert len(response.data) >= 1
|
||||||
|
assert all(isinstance(model, Model) for model in response.data)
|
||||||
|
|
||||||
model_def = None
|
model_def = None
|
||||||
for model in response:
|
for model in response.data:
|
||||||
if model.identifier == inference_model:
|
if model.identifier == inference_model:
|
||||||
model_def = model
|
model_def = model
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue