mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 10:40:02 +00:00
Merge-related changes.
This commit is contained in:
commit
60e9f46856
456 changed files with 38636 additions and 10892 deletions
|
|
@ -58,7 +58,7 @@ PreprocessorChain = List[PreprocessorChainElement]
|
|||
@json_schema_type
|
||||
class PreprocessorResponse(BaseModel):
|
||||
success: bool
|
||||
output_data_type: PreprocessingDataType
|
||||
output_data_type: PreprocessingDataType | None
|
||||
results: Optional[List[PreprocessingDataElement]] = None
|
||||
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ class PreprocessorStore(Protocol):
|
|||
|
||||
@runtime_checkable
|
||||
class Preprocessing(Protocol):
|
||||
preprocessor_store: PreprocessorStore
|
||||
preprocessor_store: PreprocessorStore | None
|
||||
|
||||
@webmethod(route="/preprocess", method="POST")
|
||||
async def preprocess(
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# This source code is licensed under the terms described in the LICENSE file in
|
||||
# the root directory of this source tree.
|
||||
|
||||
from typing import Any, Dict, List, Literal, Optional, Protocol, runtime_checkable
|
||||
from typing import Any, Dict, List, Optional, Protocol, runtime_checkable
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ from llama_stack.schema_utils import json_schema_type, webmethod
|
|||
|
||||
@json_schema_type
|
||||
class Preprocessor(Resource):
|
||||
type: Literal[ResourceType.preprocessor.value] = ResourceType.preprocessor.value
|
||||
type: ResourceType = ResourceType.preprocessor
|
||||
|
||||
@property
|
||||
def preprocessor_id(self) -> str:
|
||||
|
|
@ -48,7 +48,7 @@ class Preprocessors(Protocol):
|
|||
async def get_preprocessor(
|
||||
self,
|
||||
preprocessor_id: str,
|
||||
) -> Optional[Preprocessor]: ...
|
||||
) -> Preprocessor: ...
|
||||
|
||||
@webmethod(route="/preprocessors", method="POST")
|
||||
async def register_preprocessor(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue