forked from phoenix-oss/llama-stack-mirror
llama-stack version alpha -> v1
This commit is contained in:
parent
a51c8b4efc
commit
b78e6675ea
8 changed files with 390 additions and 407 deletions
|
@ -64,11 +64,13 @@ InterleavedContent = register_schema(
|
|||
)
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class TextDelta(BaseModel):
|
||||
type: Literal["text"] = "text"
|
||||
text: str
|
||||
|
||||
|
||||
@json_schema_type
|
||||
class ImageDelta(BaseModel):
|
||||
type: Literal["image"] = "image"
|
||||
data: bytes
|
||||
|
|
|
@ -15,7 +15,7 @@ from typing import (
|
|||
Union,
|
||||
)
|
||||
|
||||
from llama_models.schema_utils import json_schema_type, webmethod
|
||||
from llama_models.schema_utils import json_schema_type, register_schema, webmethod
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
@ -113,15 +113,18 @@ class GraphMemoryBank(MemoryBankResourceMixin):
|
|||
memory_bank_type: Literal[MemoryBankType.graph.value] = MemoryBankType.graph.value
|
||||
|
||||
|
||||
MemoryBank = Annotated[
|
||||
Union[
|
||||
VectorMemoryBank,
|
||||
KeyValueMemoryBank,
|
||||
KeywordMemoryBank,
|
||||
GraphMemoryBank,
|
||||
MemoryBank = register_schema(
|
||||
Annotated[
|
||||
Union[
|
||||
VectorMemoryBank,
|
||||
KeyValueMemoryBank,
|
||||
KeywordMemoryBank,
|
||||
GraphMemoryBank,
|
||||
],
|
||||
Field(discriminator="memory_bank_type"),
|
||||
],
|
||||
Field(discriminator="memory_bank_type"),
|
||||
]
|
||||
name="MemoryBank",
|
||||
)
|
||||
|
||||
|
||||
class MemoryBankInput(BaseModel):
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
# 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"
|
||||
LLAMA_STACK_API_VERSION = "v1"
|
||||
|
|
|
@ -40,8 +40,6 @@ from llama_stack.providers.datatypes import Api
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
LLAMA_STACK_API_VERSION = "alpha"
|
||||
|
||||
|
||||
class LlamaStack(
|
||||
MemoryBanks,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue