mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 04:17:32 +00:00
feat: introduce API leveling, post_training to v1alpha
Rather than have a single `LLAMA_STACK_VERSION`, we need to have a `_V1`, `_V1ALPHA`, and `_V1BETA` constant. This also necessitated addition of `level` to the `WebMethod` so that routing can be handeled properly. move post_training to `v1alpha` as it is under heavy development and not near its final state Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
parent
6b855af96f
commit
8095602697
9 changed files with 37 additions and 29 deletions
|
@ -13,6 +13,7 @@ from .strong_typing.schema import json_schema_type, register_schema # noqa: F40
|
|||
|
||||
@dataclass
|
||||
class WebMethod:
|
||||
level: str | None = "v1"
|
||||
route: str | None = None
|
||||
public: bool = False
|
||||
request_examples: list[Any] | None = None
|
||||
|
@ -31,6 +32,7 @@ T = TypeVar("T", bound=Callable[..., Any])
|
|||
def webmethod(
|
||||
route: str | None = None,
|
||||
method: str | None = None,
|
||||
level: str | None = "v1",
|
||||
public: bool | None = False,
|
||||
request_examples: list[Any] | None = None,
|
||||
response_examples: list[Any] | None = None,
|
||||
|
@ -54,6 +56,7 @@ def webmethod(
|
|||
func.__webmethod__ = WebMethod( # type: ignore
|
||||
route=route,
|
||||
method=method,
|
||||
level=level,
|
||||
public=public or False,
|
||||
request_examples=request_examples,
|
||||
response_examples=response_examples,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue