mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-27 06:28:50 +00:00
update: code review
- change type from str to Field with description - remove test from test_distrubution.py, keep in test_providers.py Signed-off-by: Wen Zhou <wenzhou@redhat.com>
This commit is contained in:
parent
0b051c037b
commit
2ce9402593
3 changed files with 30 additions and 127 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
from typing import Any, Protocol, runtime_checkable
|
||||
|
||||
from pydantic import BaseModel, HttpUrl, field_validator
|
||||
from pydantic import BaseModel, Field, HttpUrl, field_validator
|
||||
|
||||
from llama_stack.providers.datatypes import HealthResponse
|
||||
from llama_stack.schema_utils import json_schema_type, webmethod
|
||||
|
@ -19,7 +19,9 @@ class ProviderInfo(BaseModel):
|
|||
provider_type: str
|
||||
config: dict[str, Any]
|
||||
health: HealthResponse
|
||||
metrics: str | None = None # define as string type than httpurl for openapi compatibility
|
||||
metrics: str | None = Field(
|
||||
default=None, description="endpoint for metrics from providers. Must be a valid HTTP URL if provided."
|
||||
)
|
||||
|
||||
@field_validator("metrics")
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue