Add version to REST API url (#478)

# What does this PR do? 

Adds a `/alpha/` prefix to all the REST API urls.

Also makes them all use hyphens instead of underscores as is more
standard practice.

(This is based on feedback from our partners.)

## Test Plan 

The Stack itself does not need updating. However, client SDKs and
documentation will need to be updated.
This commit is contained in:
Ashwin Bharambe 2024-11-18 22:44:14 -08:00 committed by GitHub
parent 05e93bd2f7
commit 0dc7f5fa89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 32842 additions and 6032 deletions

View file

@ -31,7 +31,12 @@ from .strong_typing.schema import json_schema_type
schema_utils.json_schema_type = json_schema_type
from llama_stack.distribution.stack import LlamaStack
# this line needs to be here to ensure json_schema_type has been altered before
# the imports use the annotation
from llama_stack.distribution.stack import ( # noqa: E402
LLAMA_STACK_API_VERSION,
LlamaStack,
)
def main(output_dir: str):
@ -50,7 +55,7 @@ def main(output_dir: str):
server=Server(url="http://any-hosted-llama-stack.com"),
info=Info(
title="[DRAFT] Llama Stack Specification",
version="0.0.1",
version=LLAMA_STACK_API_VERSION,
description="""This is the specification of the llama stack that provides
a set of endpoints and their corresponding interfaces that are tailored to
best leverage Llama Models. The specification is still in draft and subject to change.