Merge-related changes.

This commit is contained in:
ilya-kolchinsky 2025-04-02 19:56:44 +02:00
commit 60e9f46856
456 changed files with 38636 additions and 10892 deletions

View file

@ -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(

View file

@ -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(