forked from phoenix-oss/llama-stack-mirror
Fix the pyopenapi generator avoid potential circular imports
This commit is contained in:
parent
d463d68e1e
commit
8ed79ad0f3
6 changed files with 5678 additions and 32467 deletions
|
@ -33,10 +33,8 @@ schema_utils.json_schema_type = json_schema_type
|
||||||
|
|
||||||
# this line needs to be here to ensure json_schema_type has been altered before
|
# this line needs to be here to ensure json_schema_type has been altered before
|
||||||
# the imports use the annotation
|
# the imports use the annotation
|
||||||
from llama_stack.distribution.stack import ( # noqa: E402
|
from llama_stack.apis.version import LLAMA_STACK_API_VERSION # noqa: E402
|
||||||
LLAMA_STACK_API_VERSION,
|
from llama_stack.distribution.stack import LlamaStack # noqa: E402
|
||||||
LlamaStack,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def main(output_dir: str):
|
def main(output_dir: str):
|
||||||
|
|
|
@ -204,7 +204,7 @@ class ContentBuilder:
|
||||||
if self.schema_transformer:
|
if self.schema_transformer:
|
||||||
schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = (
|
schema_transformer: Callable[[SchemaOrRef], SchemaOrRef] = (
|
||||||
self.schema_transformer
|
self.schema_transformer
|
||||||
) # type: ignore
|
)
|
||||||
schema = schema_transformer(schema)
|
schema = schema_transformer(schema)
|
||||||
|
|
||||||
if not examples:
|
if not examples:
|
||||||
|
|
|
@ -12,7 +12,7 @@ import uuid
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union
|
from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union
|
||||||
|
|
||||||
from llama_stack.distribution.stack import LLAMA_STACK_API_VERSION
|
from llama_stack.apis.version import LLAMA_STACK_API_VERSION
|
||||||
|
|
||||||
from termcolor import colored
|
from termcolor import colored
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
7
llama_stack/apis/version.py
Normal file
7
llama_stack/apis/version.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# This source code is licensed under the terms described in the LICENSE file in
|
||||||
|
# the root directory of this source tree.
|
||||||
|
|
||||||
|
LLAMA_STACK_API_VERSION = "alpha"
|
Loading…
Add table
Add a link
Reference in a new issue