kikocis/llama-stack public
Changesets · Branches · Tags · Compare
| Changeset | 7d178b9d269ac7934eb0a5a42b680343c8b3169cdde99b92e4bcfba4fdde984e |
|---|---|
| Author | Ashwin Bharambe <ashwin@meta.com> · 2024-09-07 15:23 -07:00 |
| Committer | Ashwin Bharambe <ashwin@meta.com> · 2024-09-07 15:23 -07:00 |
| Parents | fb896ea47ba7 |
10 files changed
deleted llama_toolchain/observability/__init__.py +0 −5
| @@ -1,5 +0,0 @@ | ||
| 1 | -# Copyright (c) Meta Platforms, Inc. and affiliates. | |
| 2 | -# All rights reserved. | |
| 3 | -# | |
| 4 | -# This source code is licensed under the terms described in the LICENSE file in | |
| 5 | -# the root directory of this source tree. |
deleted llama_toolchain/observability/api/__init__.py +0 −7
| @@ -1,7 +0,0 @@ | ||
| 1 | -# Copyright (c) Meta Platforms, Inc. and affiliates. | |
| 2 | -# All rights reserved. | |
| 3 | -# | |
| 4 | -# This source code is licensed under the terms described in the LICENSE file in | |
| 5 | -# the root directory of this source tree. | |
| 6 | - | |
| 7 | -from .api import * # noqa: F401 F403 |
deleted llama_toolchain/observability/api/api.py +0 −175
| @@ -1,175 +0,0 @@ | ||
| 1 | -# Copyright (c) Meta Platforms, Inc. and affiliates. | |
| 2 | -# All rights reserved. | |
| 3 | -# | |
| 4 | -# This source code is licensed under the terms described in the LICENSE file in | |
| 5 | -# the root directory of this source tree. | |
| 6 | - | |
| 7 | -from datetime import datetime | |
| 8 | -from enum import Enum | |
| 9 | - | |
| 10 | -from typing import Any, Dict, List, Optional, Protocol, Union | |
| 11 | - | |
| 12 | -from llama_models.schema_utils import json_schema_type, webmethod | |
| 13 | - | |
| 14 | -from pydantic import BaseModel | |
| 15 | - | |
| 16 | - | |
| 17 | -@json_schema_type | |
| 18 | -class ExperimentStatus(Enum): | |
| 19 | - NOT_STARTED = "not_started" | |
| 20 | - RUNNING = "running" | |
| 21 | - COMPLETED = "completed" | |
| 22 | - FAILED = "failed" | |
| 23 | - | |
| 24 | - | |
| 25 | -@json_schema_type | |
| 26 | -class Experiment(BaseModel): | |
| 27 | - id: str | |
| 28 | - name: str | |
| 29 | - status: ExperimentStatus | |
| 30 | - created_at: datetime | |
| 31 | - updated_at: datetime | |
| 32 | - metadata: Dict[str, Any] | |
| 33 | - | |
| 34 | - | |
| 35 | -@json_schema_type | |
| 36 | -class Run(BaseModel): | |
| 37 | - id: str | |
| 38 | - experiment_id: str | |
| 39 | - status: str | |
| 40 | - started_at: datetime | |
| 41 | - ended_at: Optional[datetime] | |
| 42 | - metadata: Dict[str, Any] | |
| 43 | - | |
| 44 | - | |
| 45 | -@json_schema_type | |
| 46 | -class Metric(BaseModel): | |
| 47 | - name: str | |
| 48 | - value: Union[float, int, str, bool] | |
| 49 | - timestamp: datetime | |
| 50 | - run_id: str | |
| 51 | - | |
| 52 | - | |
| 53 | -@json_schema_type | |
| 54 | -class Log(BaseModel): | |
| 55 | - message: str | |
| 56 | - level: str | |
| 57 | - timestamp: datetime | |
| 58 | - additional_info: Dict[str, Any] | |
| 59 | - | |
| 60 | - | |
| 61 | -@json_schema_type | |
| 62 | -class ArtifactType(Enum): | |
| 63 | - MODEL = "model" | |
| 64 | - DATASET = "dataset" | |
| 65 | - CHECKPOINT = "checkpoint" | |
| 66 | - PLOT = "plot" | |
| 67 | - METRIC = "metric" | |
| 68 | - CONFIG = "config" | |
| 69 | - CODE = "code" | |
| 70 | - OTHER = "other" | |
| 71 | - | |
| 72 | - | |
| 73 | -@json_schema_type | |
| 74 | -class Artifact(BaseModel): | |
| 75 | - id: str | |
| 76 | - name: str | |
| 77 | - type: ArtifactType | |
| 78 | - size: int | |
| 79 | - created_at: datetime | |
| 80 | - metadata: Dict[str, Any] | |
| 81 | - | |
| 82 | - | |
| 83 | -@json_schema_type | |
| 84 | -class CreateExperimentRequest(BaseModel): | |
| 85 | - name: str | |
| 86 | - metadata: Optional[Dict[str, Any]] = None | |
| 87 | - | |
| 88 | - | |
| 89 | -@json_schema_type | |
| 90 | -class UpdateExperimentRequest(BaseModel): | |
| 91 | - experiment_id: str | |
| 92 | - status: Optional[ExperimentStatus] = None | |
| 93 | - metadata: Optional[Dict[str, Any]] = None | |
| 94 | - | |
| 95 | - | |
| 96 | -@json_schema_type | |
| 97 | -class CreateRunRequest(BaseModel): | |
| 98 | - experiment_id: str | |
| 99 | - metadata: Optional[Dict[str, Any]] = None | |
| 100 | - | |
| 101 | - | |
| 102 | -@json_schema_type | |
| 103 | -class UpdateRunRequest(BaseModel): | |
| 104 | - run_id: str | |
| 105 | - status: Optional[str] = None | |
| 106 | - ended_at: Optional[datetime] = None | |
| 107 | - metadata: Optional[Dict[str, Any]] = None | |
| 108 | - | |
| 109 | - | |
| 110 | -@json_schema_type | |
| 111 | -class LogMetricsRequest(BaseModel): | |
| 112 | - run_id: str | |
| 113 | - metrics: List[Metric] | |
| 114 | - | |
| 115 | - | |
| 116 | -@json_schema_type | |
| 117 | -class LogMessagesRequest(BaseModel): | |
| 118 | - logs: List[Log] | |
| 119 | - run_id: Optional[str] = None | |
| 120 | - | |
| 121 | - | |
| 122 | -@json_schema_type | |
| 123 | -class UploadArtifactRequest(BaseModel): | |
| 124 | - experiment_id: str | |
| 125 | - name: str | |
| 126 | - artifact_type: str | |
| 127 | - content: bytes | |
| 128 | - metadata: Optional[Dict[str, Any]] = None | |
| 129 | - | |
| 130 | - | |
| 131 | -@json_schema_type | |
| 132 | -class LogSearchRequest(BaseModel): | |
| 133 | - query: str | |
| 134 | - filters: Optional[Dict[str, Any]] = None | |
| 135 | - | |
| 136 | - | |
| 137 | -class Observability(Protocol): | |
| 138 | - @webmethod(route="/experiments/create") | |
| 139 | - def create_experiment(self, request: CreateExperimentRequest) -> Experiment: ... | |
| 140 | - | |
| 141 | - @webmethod(route="/experiments/list") | |
| 142 | - def list_experiments(self) -> List[Experiment]: ... | |
| 143 | - | |
| 144 | - @webmethod(route="/experiments/get") | |
| 145 | - def get_experiment(self, experiment_id: str) -> Experiment: ... | |
| 146 | - | |
| 147 | - @webmethod(route="/experiments/update") | |
| 148 | - def update_experiment(self, request: UpdateExperimentRequest) -> Experiment: ... | |
| 149 | - | |
| 150 | - @webmethod(route="/experiments/create_run") | |
| 151 | - def create_run(self, request: CreateRunRequest) -> Run: ... | |
| 152 | - | |
| 153 | - @webmethod(route="/runs/update") | |
| 154 | - def update_run(self, request: UpdateRunRequest) -> Run: ... | |
| 155 | - | |
| 156 | - @webmethod(route="/runs/log_metrics") | |
| 157 | - def log_metrics(self, request: LogMetricsRequest) -> None: ... | |
| 158 | - | |
| 159 | - @webmethod(route="/runs/metrics", method="GET") | |
| 160 | - def get_metrics(self, run_id: str) -> List[Metric]: ... | |
| 161 | - | |
| 162 | - @webmethod(route="/logging/log_messages") | |
| 163 | - def log_messages(self, request: LogMessagesRequest) -> None: ... | |
| 164 | - | |
| 165 | - @webmethod(route="/logging/get_logs") | |
| 166 | - def get_logs(self, request: LogSearchRequest) -> List[Log]: ... | |
| 167 | - | |
| 168 | - @webmethod(route="/experiments/artifacts/upload") | |
| 169 | - def upload_artifact(self, request: UploadArtifactRequest) -> Artifact: ... | |
| 170 | - | |
| 171 | - @webmethod(route="/experiments/artifacts/get") | |
| 172 | - def list_artifacts(self, experiment_id: str) -> List[Artifact]: ... | |
| 173 | - | |
| 174 | - @webmethod(route="/artifacts/get") | |
| 175 | - def get_artifact(self, artifact_id: str) -> Artifact: ... |
modified llama_toolchain/stack.py +2 −2
| @@ -11,7 +11,7 @@ | ||
| 11 | 11 | from llama_toolchain.inference.api import * # noqa: F403 |
| 12 | 12 | from llama_toolchain.batch_inference.api import * # noqa: F403 |
| 13 | 13 | from llama_toolchain.memory.api import * # noqa: F403 |
| 14 | -from llama_toolchain.observability.api import * # noqa: F403 | |
| 14 | +from llama_toolchain.telemetry.api import * # noqa: F403 | |
| 15 | 15 | from llama_toolchain.post_training.api import * # noqa: F403 |
| 16 | 16 | from llama_toolchain.reward_scoring.api import * # noqa: F403 |
| 17 | 17 | from llama_toolchain.synthetic_data_generation.api import * # noqa: F403 |
| @@ -24,7 +24,7 @@ | ||
| 24 | 24 | RewardScoring, |
| 25 | 25 | SyntheticDataGeneration, |
| 26 | 26 | Datasets, |
| 27 | - Observability, | |
| 27 | + Telemetry, | |
| 28 | 28 | PostTraining, |
| 29 | 29 | Memory, |
| 30 | 30 | Evaluations, |
added llama_toolchain/telemetry/__init__.py +5 −0
| @@ -0,0 +1,5 @@ | ||
| 1 | +# Copyright (c) Meta Platforms, Inc. and affiliates. | |
| 2 | +# All rights reserved. | |
| 3 | +# | |
| 4 | +# This source code is licensed under the terms described in the LICENSE file in | |
| 5 | +# the root directory of this source tree. |
added llama_toolchain/telemetry/api/__init__.py +7 −0
| @@ -0,0 +1,7 @@ | ||
| 1 | +# Copyright (c) Meta Platforms, Inc. and affiliates. | |
| 2 | +# All rights reserved. | |
| 3 | +# | |
| 4 | +# This source code is licensed under the terms described in the LICENSE file in | |
| 5 | +# the root directory of this source tree. | |
| 6 | + | |
| 7 | +from .api import * # noqa: F401 F403 |
added llama_toolchain/telemetry/api/api.py +175 −0
| @@ -0,0 +1,175 @@ | ||
| 1 | +# Copyright (c) Meta Platforms, Inc. and affiliates. | |
| 2 | +# All rights reserved. | |
| 3 | +# | |
| 4 | +# This source code is licensed under the terms described in the LICENSE file in | |
| 5 | +# the root directory of this source tree. | |
| 6 | + | |
| 7 | +from datetime import datetime | |
| 8 | +from enum import Enum | |
| 9 | + | |
| 10 | +from typing import Any, Dict, List, Optional, Protocol, Union | |
| 11 | + | |
| 12 | +from llama_models.schema_utils import json_schema_type, webmethod | |
| 13 | + | |
| 14 | +from pydantic import BaseModel | |
| 15 | + | |
| 16 | + | |
| 17 | +@json_schema_type | |
| 18 | +class ExperimentStatus(Enum): | |
| 19 | + NOT_STARTED = "not_started" | |
| 20 | + RUNNING = "running" | |
| 21 | + COMPLETED = "completed" | |
| 22 | + FAILED = "failed" | |
| 23 | + | |
| 24 | + | |
| 25 | +@json_schema_type | |
| 26 | +class Experiment(BaseModel): | |
| 27 | + id: str | |
| 28 | + name: str | |
| 29 | + status: ExperimentStatus | |
| 30 | + created_at: datetime | |
| 31 | + updated_at: datetime | |
| 32 | + metadata: Dict[str, Any] | |
| 33 | + | |
| 34 | + | |
| 35 | +@json_schema_type | |
| 36 | +class Run(BaseModel): | |
| 37 | + id: str | |
| 38 | + experiment_id: str | |
| 39 | + status: str | |
| 40 | + started_at: datetime | |
| 41 | + ended_at: Optional[datetime] | |
| 42 | + metadata: Dict[str, Any] | |
| 43 | + | |
| 44 | + | |
| 45 | +@json_schema_type | |
| 46 | +class Metric(BaseModel): | |
| 47 | + name: str | |
| 48 | + value: Union[float, int, str, bool] | |
| 49 | + timestamp: datetime | |
| 50 | + run_id: str | |
| 51 | + | |
| 52 | + | |
| 53 | +@json_schema_type | |
| 54 | +class Log(BaseModel): | |
| 55 | + message: str | |
| 56 | + level: str | |
| 57 | + timestamp: datetime | |
| 58 | + additional_info: Dict[str, Any] | |
| 59 | + | |
| 60 | + | |
| 61 | +@json_schema_type | |
| 62 | +class ArtifactType(Enum): | |
| 63 | + MODEL = "model" | |
| 64 | + DATASET = "dataset" | |
| 65 | + CHECKPOINT = "checkpoint" | |
| 66 | + PLOT = "plot" | |
| 67 | + METRIC = "metric" | |
| 68 | + CONFIG = "config" | |
| 69 | + CODE = "code" | |
| 70 | + OTHER = "other" | |
| 71 | + | |
| 72 | + | |
| 73 | +@json_schema_type | |
| 74 | +class Artifact(BaseModel): | |
| 75 | + id: str | |
| 76 | + name: str | |
| 77 | + type: ArtifactType | |
| 78 | + size: int | |
| 79 | + created_at: datetime | |
| 80 | + metadata: Dict[str, Any] | |
| 81 | + | |
| 82 | + | |
| 83 | +@json_schema_type | |
| 84 | +class CreateExperimentRequest(BaseModel): | |
| 85 | + name: str | |
| 86 | + metadata: Optional[Dict[str, Any]] = None | |
| 87 | + | |
| 88 | + | |
| 89 | +@json_schema_type | |
| 90 | +class UpdateExperimentRequest(BaseModel): | |
| 91 | + experiment_id: str | |
| 92 | + status: Optional[ExperimentStatus] = None | |
| 93 | + metadata: Optional[Dict[str, Any]] = None | |
| 94 | + | |
| 95 | + | |
| 96 | +@json_schema_type | |
| 97 | +class CreateRunRequest(BaseModel): | |
| 98 | + experiment_id: str | |
| 99 | + metadata: Optional[Dict[str, Any]] = None | |
| 100 | + | |
| 101 | + | |
| 102 | +@json_schema_type | |
| 103 | +class UpdateRunRequest(BaseModel): | |
| 104 | + run_id: str | |
| 105 | + status: Optional[str] = None | |
| 106 | + ended_at: Optional[datetime] = None | |
| 107 | + metadata: Optional[Dict[str, Any]] = None | |
| 108 | + | |
| 109 | + | |
| 110 | +@json_schema_type | |
| 111 | +class LogMetricsRequest(BaseModel): | |
| 112 | + run_id: str | |
| 113 | + metrics: List[Metric] | |
| 114 | + | |
| 115 | + | |
| 116 | +@json_schema_type | |
| 117 | +class LogMessagesRequest(BaseModel): | |
| 118 | + logs: List[Log] | |
| 119 | + run_id: Optional[str] = None | |
| 120 | + | |
| 121 | + | |
| 122 | +@json_schema_type | |
| 123 | +class UploadArtifactRequest(BaseModel): | |
| 124 | + experiment_id: str | |
| 125 | + name: str | |
| 126 | + artifact_type: str | |
| 127 | + content: bytes | |
| 128 | + metadata: Optional[Dict[str, Any]] = None | |
| 129 | + | |
| 130 | + | |
| 131 | +@json_schema_type | |
| 132 | +class LogSearchRequest(BaseModel): | |
| 133 | + query: str | |
| 134 | + filters: Optional[Dict[str, Any]] = None | |
| 135 | + | |
| 136 | + | |
| 137 | +class Telemetry(Protocol): | |
| 138 | + @webmethod(route="/experiments/create") | |
| 139 | + def create_experiment(self, request: CreateExperimentRequest) -> Experiment: ... | |
| 140 | + | |
| 141 | + @webmethod(route="/experiments/list") | |
| 142 | + def list_experiments(self) -> List[Experiment]: ... | |
| 143 | + | |
| 144 | + @webmethod(route="/experiments/get") | |
| 145 | + def get_experiment(self, experiment_id: str) -> Experiment: ... | |
| 146 | + | |
| 147 | + @webmethod(route="/experiments/update") | |
| 148 | + def update_experiment(self, request: UpdateExperimentRequest) -> Experiment: ... | |
| 149 | + | |
| 150 | + @webmethod(route="/experiments/create_run") | |
| 151 | + def create_run(self, request: CreateRunRequest) -> Run: ... | |
| 152 | + | |
| 153 | + @webmethod(route="/runs/update") | |
| 154 | + def update_run(self, request: UpdateRunRequest) -> Run: ... | |
| 155 | + | |
| 156 | + @webmethod(route="/runs/log_metrics") | |
| 157 | + def log_metrics(self, request: LogMetricsRequest) -> None: ... | |
| 158 | + | |
| 159 | + @webmethod(route="/runs/metrics", method="GET") | |
| 160 | + def get_metrics(self, run_id: str) -> List[Metric]: ... | |
| 161 | + | |
| 162 | + @webmethod(route="/logging/log_messages") | |
| 163 | + def log_messages(self, request: LogMessagesRequest) -> None: ... | |
| 164 | + | |
| 165 | + @webmethod(route="/logging/get_logs") | |
| 166 | + def get_logs(self, request: LogSearchRequest) -> List[Log]: ... | |
| 167 | + | |
| 168 | + @webmethod(route="/experiments/artifacts/upload") | |
| 169 | + def upload_artifact(self, request: UploadArtifactRequest) -> Artifact: ... | |
| 170 | + | |
| 171 | + @webmethod(route="/experiments/artifacts/get") | |
| 172 | + def list_artifacts(self, experiment_id: str) -> List[Artifact]: ... | |
| 173 | + | |
| 174 | + @webmethod(route="/artifacts/get") | |
| 175 | + def get_artifact(self, artifact_id: str) -> Artifact: ... |
modified rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html +380 −156
| @@ -21,7 +21,7 @@ | ||
| 21 | 21 | "info": { |
| 22 | 22 | "title": "[DRAFT] Llama Stack Specification", |
| 23 | 23 | "version": "0.0.1", |
| 24 | - "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-04 10:28:38.779789" | |
| 24 | + "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-07 15:23:29.488676" | |
| 25 | 25 | }, |
| 26 | 26 | "servers": [ |
| 27 | 27 | { |
| @@ -323,7 +323,7 @@ | ||
| 323 | 323 | } |
| 324 | 324 | }, |
| 325 | 325 | "tags": [ |
| 326 | - "Observability" | |
| 326 | + "Telemetry" | |
| 327 | 327 | ], |
| 328 | 328 | "parameters": [], |
| 329 | 329 | "requestBody": { |
| @@ -383,7 +383,7 @@ | ||
| 383 | 383 | } |
| 384 | 384 | }, |
| 385 | 385 | "tags": [ |
| 386 | - "Observability" | |
| 386 | + "Telemetry" | |
| 387 | 387 | ], |
| 388 | 388 | "parameters": [], |
| 389 | 389 | "requestBody": { |
| @@ -784,7 +784,7 @@ | ||
| 784 | 784 | } |
| 785 | 785 | }, |
| 786 | 786 | "tags": [ |
| 787 | - "Observability" | |
| 787 | + "Telemetry" | |
| 788 | 788 | ], |
| 789 | 789 | "parameters": [ |
| 790 | 790 | { |
| @@ -988,7 +988,7 @@ | ||
| 988 | 988 | } |
| 989 | 989 | }, |
| 990 | 990 | "tags": [ |
| 991 | - "Observability" | |
| 991 | + "Telemetry" | |
| 992 | 992 | ], |
| 993 | 993 | "parameters": [ |
| 994 | 994 | { |
| @@ -1017,7 +1017,7 @@ | ||
| 1017 | 1017 | } |
| 1018 | 1018 | }, |
| 1019 | 1019 | "tags": [ |
| 1020 | - "Observability" | |
| 1020 | + "Telemetry" | |
| 1021 | 1021 | ], |
| 1022 | 1022 | "parameters": [], |
| 1023 | 1023 | "requestBody": { |
| @@ -1083,7 +1083,7 @@ | ||
| 1083 | 1083 | } |
| 1084 | 1084 | }, |
| 1085 | 1085 | "tags": [ |
| 1086 | - "Observability" | |
| 1086 | + "Telemetry" | |
| 1087 | 1087 | ], |
| 1088 | 1088 | "parameters": [ |
| 1089 | 1089 | { |
| @@ -1242,7 +1242,7 @@ | ||
| 1242 | 1242 | } |
| 1243 | 1243 | }, |
| 1244 | 1244 | "tags": [ |
| 1245 | - "Observability" | |
| 1245 | + "Telemetry" | |
| 1246 | 1246 | ], |
| 1247 | 1247 | "parameters": [], |
| 1248 | 1248 | "requestBody": { |
| @@ -1272,7 +1272,7 @@ | ||
| 1272 | 1272 | } |
| 1273 | 1273 | }, |
| 1274 | 1274 | "tags": [ |
| 1275 | - "Observability" | |
| 1275 | + "Telemetry" | |
| 1276 | 1276 | ], |
| 1277 | 1277 | "parameters": [] |
| 1278 | 1278 | } |
| @@ -1305,7 +1305,7 @@ | ||
| 1305 | 1305 | } |
| 1306 | 1306 | }, |
| 1307 | 1307 | "tags": [ |
| 1308 | - "Observability" | |
| 1308 | + "Telemetry" | |
| 1309 | 1309 | ], |
| 1310 | 1310 | "parameters": [], |
| 1311 | 1311 | "requestBody": { |
| @@ -1328,7 +1328,7 @@ | ||
| 1328 | 1328 | } |
| 1329 | 1329 | }, |
| 1330 | 1330 | "tags": [ |
| 1331 | - "Observability" | |
| 1331 | + "Telemetry" | |
| 1332 | 1332 | ], |
| 1333 | 1333 | "parameters": [], |
| 1334 | 1334 | "requestBody": { |
| @@ -1531,7 +1531,7 @@ | ||
| 1531 | 1531 | } |
| 1532 | 1532 | }, |
| 1533 | 1533 | "tags": [ |
| 1534 | - "Observability" | |
| 1534 | + "Telemetry" | |
| 1535 | 1535 | ], |
| 1536 | 1536 | "parameters": [], |
| 1537 | 1537 | "requestBody": { |
| @@ -1561,7 +1561,7 @@ | ||
| 1561 | 1561 | } |
| 1562 | 1562 | }, |
| 1563 | 1563 | "tags": [ |
| 1564 | - "Observability" | |
| 1564 | + "Telemetry" | |
| 1565 | 1565 | ], |
| 1566 | 1566 | "parameters": [], |
| 1567 | 1567 | "requestBody": { |
| @@ -1591,7 +1591,7 @@ | ||
| 1591 | 1591 | } |
| 1592 | 1592 | }, |
| 1593 | 1593 | "tags": [ |
| 1594 | - "Observability" | |
| 1594 | + "Telemetry" | |
| 1595 | 1595 | ], |
| 1596 | 1596 | "parameters": [], |
| 1597 | 1597 | "requestBody": { |
| @@ -2376,7 +2376,183 @@ | ||
| 2376 | 2376 | "$ref": "#/components/schemas/FunctionCallToolDefinition" |
| 2377 | 2377 | }, |
| 2378 | 2378 | { |
| 2379 | - "$ref": "#/components/schemas/MemoryToolDefinition" | |
| 2379 | + "type": "object", | |
| 2380 | + "properties": { | |
| 2381 | + "input_shields": { | |
| 2382 | + "type": "array", | |
| 2383 | + "items": { | |
| 2384 | + "$ref": "#/components/schemas/ShieldDefinition" | |
| 2385 | + } | |
| 2386 | + }, | |
| 2387 | + "output_shields": { | |
| 2388 | + "type": "array", | |
| 2389 | + "items": { | |
| 2390 | + "$ref": "#/components/schemas/ShieldDefinition" | |
| 2391 | + } | |
| 2392 | + }, | |
| 2393 | + "type": { | |
| 2394 | + "type": "string", | |
| 2395 | + "const": "memory" | |
| 2396 | + }, | |
| 2397 | + "memory_bank_configs": { | |
| 2398 | + "type": "array", | |
| 2399 | + "items": { | |
| 2400 | + "oneOf": [ | |
| 2401 | + { | |
| 2402 | + "type": "object", | |
| 2403 | + "properties": { | |
| 2404 | + "bank_id": { | |
| 2405 | + "type": "string" | |
| 2406 | + }, | |
| 2407 | + "type": { | |
| 2408 | + "type": "string", | |
| 2409 | + "const": "vector" | |
| 2410 | + } | |
| 2411 | + }, | |
| 2412 | + "additionalProperties": false, | |
| 2413 | + "required": [ | |
| 2414 | + "bank_id", | |
| 2415 | + "type" | |
| 2416 | + ] | |
| 2417 | + }, | |
| 2418 | + { | |
| 2419 | + "type": "object", | |
| 2420 | + "properties": { | |
| 2421 | + "bank_id": { | |
| 2422 | + "type": "string" | |
| 2423 | + }, | |
| 2424 | + "type": { | |
| 2425 | + "type": "string", | |
| 2426 | + "const": "keyvalue" | |
| 2427 | + }, | |
| 2428 | + "keys": { | |
| 2429 | + "type": "array", | |
| 2430 | + "items": { | |
| 2431 | + "type": "string" | |
| 2432 | + } | |
| 2433 | + } | |
| 2434 | + }, | |
| 2435 | + "additionalProperties": false, | |
| 2436 | + "required": [ | |
| 2437 | + "bank_id", | |
| 2438 | + "type", | |
| 2439 | + "keys" | |
| 2440 | + ] | |
| 2441 | + }, | |
| 2442 | + { | |
| 2443 | + "type": "object", | |
| 2444 | + "properties": { | |
| 2445 | + "bank_id": { | |
| 2446 | + "type": "string" | |
| 2447 | + }, | |
| 2448 | + "type": { | |
| 2449 | + "type": "string", | |
| 2450 | + "const": "keyword" | |
| 2451 | + } | |
| 2452 | + }, | |
| 2453 | + "additionalProperties": false, | |
| 2454 | + "required": [ | |
| 2455 | + "bank_id", | |
| 2456 | + "type" | |
| 2457 | + ] | |
| 2458 | + }, | |
| 2459 | + { | |
| 2460 | + "type": "object", | |
| 2461 | + "properties": { | |
| 2462 | + "bank_id": { | |
| 2463 | + "type": "string" | |
| 2464 | + }, | |
| 2465 | + "type": { | |
| 2466 | + "type": "string", | |
| 2467 | + "const": "graph" | |
| 2468 | + }, | |
| 2469 | + "entities": { | |
| 2470 | + "type": "array", | |
| 2471 | + "items": { | |
| 2472 | + "type": "string" | |
| 2473 | + } | |
| 2474 | + } | |
| 2475 | + }, | |
| 2476 | + "additionalProperties": false, | |
| 2477 | + "required": [ | |
| 2478 | + "bank_id", | |
| 2479 | + "type", | |
| 2480 | + "entities" | |
| 2481 | + ] | |
| 2482 | + } | |
| 2483 | + ] | |
| 2484 | + } | |
| 2485 | + }, | |
| 2486 | + "query_generator_config": { | |
| 2487 | + "oneOf": [ | |
| 2488 | + { | |
| 2489 | + "type": "object", | |
| 2490 | + "properties": { | |
| 2491 | + "type": { | |
| 2492 | + "type": "string", | |
| 2493 | + "const": "default" | |
| 2494 | + }, | |
| 2495 | + "sep": { | |
| 2496 | + "type": "string" | |
| 2497 | + } | |
| 2498 | + }, | |
| 2499 | + "additionalProperties": false, | |
| 2500 | + "required": [ | |
| 2501 | + "type", | |
| 2502 | + "sep" | |
| 2503 | + ] | |
| 2504 | + }, | |
| 2505 | + { | |
| 2506 | + "type": "object", | |
| 2507 | + "properties": { | |
| 2508 | + "type": { | |
| 2509 | + "type": "string", | |
| 2510 | + "const": "llm" | |
| 2511 | + }, | |
| 2512 | + "model": { | |
| 2513 | + "type": "string" | |
| 2514 | + }, | |
| 2515 | + "template": { | |
| 2516 | + "type": "string" | |
| 2517 | + } | |
| 2518 | + }, | |
| 2519 | + "additionalProperties": false, | |
| 2520 | + "required": [ | |
| 2521 | + "type", | |
| 2522 | + "model", | |
| 2523 | + "template" | |
| 2524 | + ] | |
| 2525 | + }, | |
| 2526 | + { | |
| 2527 | + "type": "object", | |
| 2528 | + "properties": { | |
| 2529 | + "type": { | |
| 2530 | + "type": "string", | |
| 2531 | + "const": "custom" | |
| 2532 | + } | |
| 2533 | + }, | |
| 2534 | + "additionalProperties": false, | |
| 2535 | + "required": [ | |
| 2536 | + "type" | |
| 2537 | + ] | |
| 2538 | + } | |
| 2539 | + ] | |
| 2540 | + }, | |
| 2541 | + "max_tokens_in_context": { | |
| 2542 | + "type": "integer" | |
| 2543 | + }, | |
| 2544 | + "max_chunks": { | |
| 2545 | + "type": "integer" | |
| 2546 | + } | |
| 2547 | + }, | |
| 2548 | + "additionalProperties": false, | |
| 2549 | + "required": [ | |
| 2550 | + "type", | |
| 2551 | + "memory_bank_configs", | |
| 2552 | + "query_generator_config", | |
| 2553 | + "max_tokens_in_context", | |
| 2554 | + "max_chunks" | |
| 2555 | + ] | |
| 2380 | 2556 | } |
| 2381 | 2557 | ] |
| 2382 | 2558 | } |
| @@ -2513,129 +2689,6 @@ | ||
| 2513 | 2689 | "parameters" |
| 2514 | 2690 | ] |
| 2515 | 2691 | }, |
| 2516 | - "MemoryToolDefinition": { | |
| 2517 | - "type": "object", | |
| 2518 | - "properties": { | |
| 2519 | - "input_shields": { | |
| 2520 | - "type": "array", | |
| 2521 | - "items": { | |
| 2522 | - "$ref": "#/components/schemas/ShieldDefinition" | |
| 2523 | - } | |
| 2524 | - }, | |
| 2525 | - "output_shields": { | |
| 2526 | - "type": "array", | |
| 2527 | - "items": { | |
| 2528 | - "$ref": "#/components/schemas/ShieldDefinition" | |
| 2529 | - } | |
| 2530 | - }, | |
| 2531 | - "type": { | |
| 2532 | - "type": "string", | |
| 2533 | - "const": "memory" | |
| 2534 | - }, | |
| 2535 | - "memory_bank_configs": { | |
| 2536 | - "type": "array", | |
| 2537 | - "items": { | |
| 2538 | - "oneOf": [ | |
| 2539 | - { | |
| 2540 | - "type": "object", | |
| 2541 | - "properties": { | |
| 2542 | - "bank_id": { | |
| 2543 | - "type": "string" | |
| 2544 | - }, | |
| 2545 | - "type": { | |
| 2546 | - "type": "string", | |
| 2547 | - "const": "vector" | |
| 2548 | - } | |
| 2549 | - }, | |
| 2550 | - "additionalProperties": false, | |
| 2551 | - "required": [ | |
| 2552 | - "bank_id", | |
| 2553 | - "type" | |
| 2554 | - ] | |
| 2555 | - }, | |
| 2556 | - { | |
| 2557 | - "type": "object", | |
| 2558 | - "properties": { | |
| 2559 | - "bank_id": { | |
| 2560 | - "type": "string" | |
| 2561 | - }, | |
| 2562 | - "type": { | |
| 2563 | - "type": "string", | |
| 2564 | - "const": "keyvalue" | |
| 2565 | - }, | |
| 2566 | - "keys": { | |
| 2567 | - "type": "array", | |
| 2568 | - "items": { | |
| 2569 | - "type": "string" | |
| 2570 | - } | |
| 2571 | - } | |
| 2572 | - }, | |
| 2573 | - "additionalProperties": false, | |
| 2574 | - "required": [ | |
| 2575 | - "bank_id", | |
| 2576 | - "type", | |
| 2577 | - "keys" | |
| 2578 | - ] | |
| 2579 | - }, | |
| 2580 | - { | |
| 2581 | - "type": "object", | |
| 2582 | - "properties": { | |
| 2583 | - "bank_id": { | |
| 2584 | - "type": "string" | |
| 2585 | - }, | |
| 2586 | - "type": { | |
| 2587 | - "type": "string", | |
| 2588 | - "const": "keyword" | |
| 2589 | - } | |
| 2590 | - }, | |
| 2591 | - "additionalProperties": false, | |
| 2592 | - "required": [ | |
| 2593 | - "bank_id", | |
| 2594 | - "type" | |
| 2595 | - ] | |
| 2596 | - }, | |
| 2597 | - { | |
| 2598 | - "type": "object", | |
| 2599 | - "properties": { | |
| 2600 | - "bank_id": { | |
| 2601 | - "type": "string" | |
| 2602 | - }, | |
| 2603 | - "type": { | |
| 2604 | - "type": "string", | |
| 2605 | - "const": "graph" | |
| 2606 | - }, | |
| 2607 | - "entities": { | |
| 2608 | - "type": "array", | |
| 2609 | - "items": { | |
| 2610 | - "type": "string" | |
| 2611 | - } | |
| 2612 | - } | |
| 2613 | - }, | |
| 2614 | - "additionalProperties": false, | |
| 2615 | - "required": [ | |
| 2616 | - "bank_id", | |
| 2617 | - "type", | |
| 2618 | - "entities" | |
| 2619 | - ] | |
| 2620 | - } | |
| 2621 | - ] | |
| 2622 | - } | |
| 2623 | - }, | |
| 2624 | - "max_tokens_in_context": { | |
| 2625 | - "type": "integer" | |
| 2626 | - }, | |
| 2627 | - "max_chunks": { | |
| 2628 | - "type": "integer" | |
| 2629 | - } | |
| 2630 | - }, | |
| 2631 | - "additionalProperties": false, | |
| 2632 | - "required": [ | |
| 2633 | - "type", | |
| 2634 | - "memory_bank_configs", | |
| 2635 | - "max_tokens_in_context", | |
| 2636 | - "max_chunks" | |
| 2637 | - ] | |
| 2638 | - }, | |
| 2639 | 2692 | "OnViolationAction": { |
| 2640 | 2693 | "type": "integer", |
| 2641 | 2694 | "enum": [ |
| @@ -2873,7 +2926,183 @@ | ||
| 2873 | 2926 | "$ref": "#/components/schemas/FunctionCallToolDefinition" |
| 2874 | 2927 | }, |
| 2875 | 2928 | { |
| 2876 | - "$ref": "#/components/schemas/MemoryToolDefinition" | |
| 2929 | + "type": "object", | |
| 2930 | + "properties": { | |
| 2931 | + "input_shields": { | |
| 2932 | + "type": "array", | |
| 2933 | + "items": { | |
| 2934 | + "$ref": "#/components/schemas/ShieldDefinition" | |
| 2935 | + } | |
| 2936 | + }, | |
| 2937 | + "output_shields": { | |
| 2938 | + "type": "array", | |
| 2939 | + "items": { | |
| 2940 | + "$ref": "#/components/schemas/ShieldDefinition" | |
| 2941 | + } | |
| 2942 | + }, | |
| 2943 | + "type": { | |
| 2944 | + "type": "string", | |
| 2945 | + "const": "memory" | |
| 2946 | + }, | |
| 2947 | + "memory_bank_configs": { | |
| 2948 | + "type": "array", | |
| 2949 | + "items": { | |
| 2950 | + "oneOf": [ | |
| 2951 | + { | |
| 2952 | + "type": "object", | |
| 2953 | + "properties": { | |
| 2954 | + "bank_id": { | |
| 2955 | + "type": "string" | |
| 2956 | + }, | |
| 2957 | + "type": { | |
| 2958 | + "type": "string", | |
| 2959 | + "const": "vector" | |
| 2960 | + } | |
| 2961 | + }, | |
| 2962 | + "additionalProperties": false, | |
| 2963 | + "required": [ | |
| 2964 | + "bank_id", | |
| 2965 | + "type" | |
| 2966 | + ] | |
| 2967 | + }, | |
| 2968 | + { | |
| 2969 | + "type": "object", | |
| 2970 | + "properties": { | |
| 2971 | + "bank_id": { | |
| 2972 | + "type": "string" | |
| 2973 | + }, | |
| 2974 | + "type": { | |
| 2975 | + "type": "string", | |
| 2976 | + "const": "keyvalue" | |
| 2977 | + }, | |
| 2978 | + "keys": { | |
| 2979 | + "type": "array", | |
| 2980 | + "items": { | |
| 2981 | + "type": "string" | |
| 2982 | + } | |
| 2983 | + } | |
| 2984 | + }, | |
| 2985 | + "additionalProperties": false, | |
| 2986 | + "required": [ | |
| 2987 | + "bank_id", | |
| 2988 | + "type", | |
| 2989 | + "keys" | |
| 2990 | + ] | |
| 2991 | + }, | |
| 2992 | + { | |
| 2993 | + "type": "object", | |
| 2994 | + "properties": { | |
| 2995 | + "bank_id": { | |
| 2996 | + "type": "string" | |
| 2997 | + }, | |
| 2998 | + "type": { | |
| 2999 | + "type": "string", | |
| 3000 | + "const": "keyword" | |
| 3001 | + } | |
| 3002 | + }, | |
| 3003 | + "additionalProperties": false, | |
| 3004 | + "required": [ | |
| 3005 | + "bank_id", | |
| 3006 | + "type" | |
| 3007 | + ] | |
| 3008 | + }, | |
| 3009 | + { | |
| 3010 | + "type": "object", | |
| 3011 | + "properties": { | |
| 3012 | + "bank_id": { | |
| 3013 | + "type": "string" | |
| 3014 | + }, | |
| 3015 | + "type": { | |
| 3016 | + "type": "string", | |
| 3017 | + "const": "graph" | |
| 3018 | + }, | |
| 3019 | + "entities": { | |
| 3020 | + "type": "array", | |
| 3021 | + "items": { | |
| 3022 | + "type": "string" | |
| 3023 | + } | |
| 3024 | + } | |
| 3025 | + }, | |
| 3026 | + "additionalProperties": false, | |
| 3027 | + "required": [ | |
| 3028 | + "bank_id", | |
| 3029 | + "type", | |
| 3030 | + "entities" | |
| 3031 | + ] | |
| 3032 | + } | |
| 3033 | + ] | |
| 3034 | + } | |
| 3035 | + }, | |
| 3036 | + "query_generator_config": { | |
| 3037 | + "oneOf": [ | |
| 3038 | + { | |
| 3039 | + "type": "object", | |
| 3040 | + "properties": { | |
| 3041 | + "type": { | |
| 3042 | + "type": "string", | |
| 3043 | + "const": "default" | |
| 3044 | + }, | |
| 3045 | + "sep": { | |
| 3046 | + "type": "string" | |
| 3047 | + } | |
| 3048 | + }, | |
| 3049 | + "additionalProperties": false, | |
| 3050 | + "required": [ | |
| 3051 | + "type", | |
| 3052 | + "sep" | |
| 3053 | + ] | |
| 3054 | + }, | |
| 3055 | + { | |
| 3056 | + "type": "object", | |
| 3057 | + "properties": { | |
| 3058 | + "type": { | |
| 3059 | + "type": "string", | |
| 3060 | + "const": "llm" | |
| 3061 | + }, | |
| 3062 | + "model": { | |
| 3063 | + "type": "string" | |
| 3064 | + }, | |
| 3065 | + "template": { | |
| 3066 | + "type": "string" | |
| 3067 | + } | |
| 3068 | + }, | |
| 3069 | + "additionalProperties": false, | |
| 3070 | + "required": [ | |
| 3071 | + "type", | |
| 3072 | + "model", | |
| 3073 | + "template" | |
| 3074 | + ] | |
| 3075 | + }, | |
| 3076 | + { | |
| 3077 | + "type": "object", | |
| 3078 | + "properties": { | |
| 3079 | + "type": { | |
| 3080 | + "type": "string", | |
| 3081 | + "const": "custom" | |
| 3082 | + } | |
| 3083 | + }, | |
| 3084 | + "additionalProperties": false, | |
| 3085 | + "required": [ | |
| 3086 | + "type" | |
| 3087 | + ] | |
| 3088 | + } | |
| 3089 | + ] | |
| 3090 | + }, | |
| 3091 | + "max_tokens_in_context": { | |
| 3092 | + "type": "integer" | |
| 3093 | + }, | |
| 3094 | + "max_chunks": { | |
| 3095 | + "type": "integer" | |
| 3096 | + } | |
| 3097 | + }, | |
| 3098 | + "additionalProperties": false, | |
| 3099 | + "required": [ | |
| 3100 | + "type", | |
| 3101 | + "memory_bank_configs", | |
| 3102 | + "query_generator_config", | |
| 3103 | + "max_tokens_in_context", | |
| 3104 | + "max_chunks" | |
| 3105 | + ] | |
| 2877 | 3106 | } |
| 2878 | 3107 | ] |
| 2879 | 3108 | } |
| @@ -5582,34 +5811,34 @@ | ||
| 5582 | 5811 | ], |
| 5583 | 5812 | "tags": [ |
| 5584 | 5813 | { |
| 5585 | - "name": "Observability" | |
| 5814 | + "name": "Telemetry" | |
| 5586 | 5815 | }, |
| 5587 | 5816 | { |
| 5588 | - "name": "Inference" | |
| 5817 | + "name": "Evaluations" | |
| 5589 | 5818 | }, |
| 5590 | 5819 | { |
| 5591 | - "name": "Datasets" | |
| 5820 | + "name": "AgenticSystem" | |
| 5592 | 5821 | }, |
| 5593 | 5822 | { |
| 5594 | - "name": "Memory" | |
| 5823 | + "name": "Inference" | |
| 5595 | 5824 | }, |
| 5596 | 5825 | { |
| 5597 | - "name": "AgenticSystem" | |
| 5826 | + "name": "BatchInference" | |
| 5598 | 5827 | }, |
| 5599 | 5828 | { |
| 5600 | - "name": "Evaluations" | |
| 5829 | + "name": "PostTraining" | |
| 5601 | 5830 | }, |
| 5602 | 5831 | { |
| 5603 | - "name": "SyntheticDataGeneration" | |
| 5832 | + "name": "Datasets" | |
| 5604 | 5833 | }, |
| 5605 | 5834 | { |
| 5606 | - "name": "RewardScoring" | |
| 5835 | + "name": "Memory" | |
| 5607 | 5836 | }, |
| 5608 | 5837 | { |
| 5609 | - "name": "PostTraining" | |
| 5838 | + "name": "SyntheticDataGeneration" | |
| 5610 | 5839 | }, |
| 5611 | 5840 | { |
| 5612 | - "name": "BatchInference" | |
| 5841 | + "name": "RewardScoring" | |
| 5613 | 5842 | }, |
| 5614 | 5843 | { |
| 5615 | 5844 | "name": "BatchChatCompletionRequest", |
| @@ -5743,10 +5972,6 @@ | ||
| 5743 | 5972 | "name": "FunctionCallToolDefinition", |
| 5744 | 5973 | "description": "<SchemaDefinition schemaRef=\"#/components/schemas/FunctionCallToolDefinition\" />" |
| 5745 | 5974 | }, |
| 5746 | - { | |
| 5747 | - "name": "MemoryToolDefinition", | |
| 5748 | - "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryToolDefinition\" />" | |
| 5749 | - }, | |
| 5750 | 5975 | { |
| 5751 | 5976 | "name": "OnViolationAction", |
| 5752 | 5977 | "description": "<SchemaDefinition schemaRef=\"#/components/schemas/OnViolationAction\" />" |
| @@ -6134,10 +6359,10 @@ | ||
| 6134 | 6359 | "Evaluations", |
| 6135 | 6360 | "Inference", |
| 6136 | 6361 | "Memory", |
| 6137 | - "Observability", | |
| 6138 | 6362 | "PostTraining", |
| 6139 | 6363 | "RewardScoring", |
| 6140 | - "SyntheticDataGeneration" | |
| 6364 | + "SyntheticDataGeneration", | |
| 6365 | + "Telemetry" | |
| 6141 | 6366 | ] |
| 6142 | 6367 | }, |
| 6143 | 6368 | { |
| @@ -6216,7 +6441,6 @@ | ||
| 6216 | 6441 | "MemoryBank", |
| 6217 | 6442 | "MemoryBankDocument", |
| 6218 | 6443 | "MemoryRetrievalStep", |
| 6219 | - "MemoryToolDefinition", | |
| 6220 | 6444 | "Metric", |
| 6221 | 6445 | "OnViolationAction", |
| 6222 | 6446 | "OptimizerConfig", |
modified rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml +254 −108
| @@ -30,7 +30,123 @@ | ||
| 30 | 30 | - $ref: '#/components/schemas/PhotogenToolDefinition' |
| 31 | 31 | - $ref: '#/components/schemas/CodeInterpreterToolDefinition' |
| 32 | 32 | - $ref: '#/components/schemas/FunctionCallToolDefinition' |
| 33 | - - $ref: '#/components/schemas/MemoryToolDefinition' | |
| 33 | + - additionalProperties: false | |
| 34 | + properties: | |
| 35 | + input_shields: | |
| 36 | + items: | |
| 37 | + $ref: '#/components/schemas/ShieldDefinition' | |
| 38 | + type: array | |
| 39 | + max_chunks: | |
| 40 | + type: integer | |
| 41 | + max_tokens_in_context: | |
| 42 | + type: integer | |
| 43 | + memory_bank_configs: | |
| 44 | + items: | |
| 45 | + oneOf: | |
| 46 | + - additionalProperties: false | |
| 47 | + properties: | |
| 48 | + bank_id: | |
| 49 | + type: string | |
| 50 | + type: | |
| 51 | + const: vector | |
| 52 | + type: string | |
| 53 | + required: | |
| 54 | + - bank_id | |
| 55 | + - type | |
| 56 | + type: object | |
| 57 | + - additionalProperties: false | |
| 58 | + properties: | |
| 59 | + bank_id: | |
| 60 | + type: string | |
| 61 | + keys: | |
| 62 | + items: | |
| 63 | + type: string | |
| 64 | + type: array | |
| 65 | + type: | |
| 66 | + const: keyvalue | |
| 67 | + type: string | |
| 68 | + required: | |
| 69 | + - bank_id | |
| 70 | + - type | |
| 71 | + - keys | |
| 72 | + type: object | |
| 73 | + - additionalProperties: false | |
| 74 | + properties: | |
| 75 | + bank_id: | |
| 76 | + type: string | |
| 77 | + type: | |
| 78 | + const: keyword | |
| 79 | + type: string | |
| 80 | + required: | |
| 81 | + - bank_id | |
| 82 | + - type | |
| 83 | + type: object | |
| 84 | + - additionalProperties: false | |
| 85 | + properties: | |
| 86 | + bank_id: | |
| 87 | + type: string | |
| 88 | + entities: | |
| 89 | + items: | |
| 90 | + type: string | |
| 91 | + type: array | |
| 92 | + type: | |
| 93 | + const: graph | |
| 94 | + type: string | |
| 95 | + required: | |
| 96 | + - bank_id | |
| 97 | + - type | |
| 98 | + - entities | |
| 99 | + type: object | |
| 100 | + type: array | |
| 101 | + output_shields: | |
| 102 | + items: | |
| 103 | + $ref: '#/components/schemas/ShieldDefinition' | |
| 104 | + type: array | |
| 105 | + query_generator_config: | |
| 106 | + oneOf: | |
| 107 | + - additionalProperties: false | |
| 108 | + properties: | |
| 109 | + sep: | |
| 110 | + type: string | |
| 111 | + type: | |
| 112 | + const: default | |
| 113 | + type: string | |
| 114 | + required: | |
| 115 | + - type | |
| 116 | + - sep | |
| 117 | + type: object | |
| 118 | + - additionalProperties: false | |
| 119 | + properties: | |
| 120 | + model: | |
| 121 | + type: string | |
| 122 | + template: | |
| 123 | + type: string | |
| 124 | + type: | |
| 125 | + const: llm | |
| 126 | + type: string | |
| 127 | + required: | |
| 128 | + - type | |
| 129 | + - model | |
| 130 | + - template | |
| 131 | + type: object | |
| 132 | + - additionalProperties: false | |
| 133 | + properties: | |
| 134 | + type: | |
| 135 | + const: custom | |
| 136 | + type: string | |
| 137 | + required: | |
| 138 | + - type | |
| 139 | + type: object | |
| 140 | + type: | |
| 141 | + const: memory | |
| 142 | + type: string | |
| 143 | + required: | |
| 144 | + - type | |
| 145 | + - memory_bank_configs | |
| 146 | + - query_generator_config | |
| 147 | + - max_tokens_in_context | |
| 148 | + - max_chunks | |
| 149 | + type: object | |
| 34 | 150 | type: array |
| 35 | 151 | required: |
| 36 | 152 | - model |
| @@ -107,7 +223,123 @@ | ||
| 107 | 223 | - $ref: '#/components/schemas/PhotogenToolDefinition' |
| 108 | 224 | - $ref: '#/components/schemas/CodeInterpreterToolDefinition' |
| 109 | 225 | - $ref: '#/components/schemas/FunctionCallToolDefinition' |
| 110 | - - $ref: '#/components/schemas/MemoryToolDefinition' | |
| 226 | + - additionalProperties: false | |
| 227 | + properties: | |
| 228 | + input_shields: | |
| 229 | + items: | |
| 230 | + $ref: '#/components/schemas/ShieldDefinition' | |
| 231 | + type: array | |
| 232 | + max_chunks: | |
| 233 | + type: integer | |
| 234 | + max_tokens_in_context: | |
| 235 | + type: integer | |
| 236 | + memory_bank_configs: | |
| 237 | + items: | |
| 238 | + oneOf: | |
| 239 | + - additionalProperties: false | |
| 240 | + properties: | |
| 241 | + bank_id: | |
| 242 | + type: string | |
| 243 | + type: | |
| 244 | + const: vector | |
| 245 | + type: string | |
| 246 | + required: | |
| 247 | + - bank_id | |
| 248 | + - type | |
| 249 | + type: object | |
| 250 | + - additionalProperties: false | |
| 251 | + properties: | |
| 252 | + bank_id: | |
| 253 | + type: string | |
| 254 | + keys: | |
| 255 | + items: | |
| 256 | + type: string | |
| 257 | + type: array | |
| 258 | + type: | |
| 259 | + const: keyvalue | |
| 260 | + type: string | |
| 261 | + required: | |
| 262 | + - bank_id | |
| 263 | + - type | |
| 264 | + - keys | |
| 265 | + type: object | |
| 266 | + - additionalProperties: false | |
| 267 | + properties: | |
| 268 | + bank_id: | |
| 269 | + type: string | |
| 270 | + type: | |
| 271 | + const: keyword | |
| 272 | + type: string | |
| 273 | + required: | |
| 274 | + - bank_id | |
| 275 | + - type | |
| 276 | + type: object | |
| 277 | + - additionalProperties: false | |
| 278 | + properties: | |
| 279 | + bank_id: | |
| 280 | + type: string | |
| 281 | + entities: | |
| 282 | + items: | |
| 283 | + type: string | |
| 284 | + type: array | |
| 285 | + type: | |
| 286 | + const: graph | |
| 287 | + type: string | |
| 288 | + required: | |
| 289 | + - bank_id | |
| 290 | + - type | |
| 291 | + - entities | |
| 292 | + type: object | |
| 293 | + type: array | |
| 294 | + output_shields: | |
| 295 | + items: | |
| 296 | + $ref: '#/components/schemas/ShieldDefinition' | |
| 297 | + type: array | |
| 298 | + query_generator_config: | |
| 299 | + oneOf: | |
| 300 | + - additionalProperties: false | |
| 301 | + properties: | |
| 302 | + sep: | |
| 303 | + type: string | |
| 304 | + type: | |
| 305 | + const: default | |
| 306 | + type: string | |
| 307 | + required: | |
| 308 | + - type | |
| 309 | + - sep | |
| 310 | + type: object | |
| 311 | + - additionalProperties: false | |
| 312 | + properties: | |
| 313 | + model: | |
| 314 | + type: string | |
| 315 | + template: | |
| 316 | + type: string | |
| 317 | + type: | |
| 318 | + const: llm | |
| 319 | + type: string | |
| 320 | + required: | |
| 321 | + - type | |
| 322 | + - model | |
| 323 | + - template | |
| 324 | + type: object | |
| 325 | + - additionalProperties: false | |
| 326 | + properties: | |
| 327 | + type: | |
| 328 | + const: custom | |
| 329 | + type: string | |
| 330 | + required: | |
| 331 | + - type | |
| 332 | + type: object | |
| 333 | + type: | |
| 334 | + const: memory | |
| 335 | + type: string | |
| 336 | + required: | |
| 337 | + - type | |
| 338 | + - memory_bank_configs | |
| 339 | + - query_generator_config | |
| 340 | + - max_tokens_in_context | |
| 341 | + - max_chunks | |
| 342 | + type: object | |
| 111 | 343 | type: array |
| 112 | 344 | required: |
| 113 | 345 | - agent_id |
| @@ -1310,88 +1542,6 @@ | ||
| 1310 | 1542 | - memory_bank_ids |
| 1311 | 1543 | - inserted_context |
| 1312 | 1544 | type: object |
| 1313 | - MemoryToolDefinition: | |
| 1314 | - additionalProperties: false | |
| 1315 | - properties: | |
| 1316 | - input_shields: | |
| 1317 | - items: | |
| 1318 | - $ref: '#/components/schemas/ShieldDefinition' | |
| 1319 | - type: array | |
| 1320 | - max_chunks: | |
| 1321 | - type: integer | |
| 1322 | - max_tokens_in_context: | |
| 1323 | - type: integer | |
| 1324 | - memory_bank_configs: | |
| 1325 | - items: | |
| 1326 | - oneOf: | |
| 1327 | - - additionalProperties: false | |
| 1328 | - properties: | |
| 1329 | - bank_id: | |
| 1330 | - type: string | |
| 1331 | - type: | |
| 1332 | - const: vector | |
| 1333 | - type: string | |
| 1334 | - required: | |
| 1335 | - - bank_id | |
| 1336 | - - type | |
| 1337 | - type: object | |
| 1338 | - - additionalProperties: false | |
| 1339 | - properties: | |
| 1340 | - bank_id: | |
| 1341 | - type: string | |
| 1342 | - keys: | |
| 1343 | - items: | |
| 1344 | - type: string | |
| 1345 | - type: array | |
| 1346 | - type: | |
| 1347 | - const: keyvalue | |
| 1348 | - type: string | |
| 1349 | - required: | |
| 1350 | - - bank_id | |
| 1351 | - - type | |
| 1352 | - - keys | |
| 1353 | - type: object | |
| 1354 | - - additionalProperties: false | |
| 1355 | - properties: | |
| 1356 | - bank_id: | |
| 1357 | - type: string | |
| 1358 | - type: | |
| 1359 | - const: keyword | |
| 1360 | - type: string | |
| 1361 | - required: | |
| 1362 | - - bank_id | |
| 1363 | - - type | |
| 1364 | - type: object | |
| 1365 | - - additionalProperties: false | |
| 1366 | - properties: | |
| 1367 | - bank_id: | |
| 1368 | - type: string | |
| 1369 | - entities: | |
| 1370 | - items: | |
| 1371 | - type: string | |
| 1372 | - type: array | |
| 1373 | - type: | |
| 1374 | - const: graph | |
| 1375 | - type: string | |
| 1376 | - required: | |
| 1377 | - - bank_id | |
| 1378 | - - type | |
| 1379 | - - entities | |
| 1380 | - type: object | |
| 1381 | - type: array | |
| 1382 | - output_shields: | |
| 1383 | - items: | |
| 1384 | - $ref: '#/components/schemas/ShieldDefinition' | |
| 1385 | - type: array | |
| 1386 | - type: | |
| 1387 | - const: memory | |
| 1388 | - type: string | |
| 1389 | - required: | |
| 1390 | - - type | |
| 1391 | - - memory_bank_configs | |
| 1392 | - - max_tokens_in_context | |
| 1393 | - - max_chunks | |
| 1394 | - type: object | |
| 1395 | 1545 | Metric: |
| 1396 | 1546 | additionalProperties: false |
| 1397 | 1547 | properties: |
| @@ -2459,7 +2609,7 @@ | ||
| 2459 | 2609 | description: "This is the specification of the llama stack that provides\n \ |
| 2460 | 2610 | \ a set of endpoints and their corresponding interfaces that are tailored\ |
| 2461 | 2611 | \ to\n best leverage Llama Models. The specification is still in\ |
| 2462 | - \ draft and subject to change.\n Generated at 2024-09-04 10:28:38.779789" | |
| 2612 | + \ draft and subject to change.\n Generated at 2024-09-07 15:23:29.488676" | |
| 2463 | 2613 | title: '[DRAFT] Llama Stack Specification' |
| 2464 | 2614 | version: 0.0.1 |
| 2465 | 2615 | jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema |
| @@ -2640,7 +2790,7 @@ | ||
| 2640 | 2790 | $ref: '#/components/schemas/Artifact' |
| 2641 | 2791 | description: OK |
| 2642 | 2792 | tags: |
| 2643 | - - Observability | |
| 2793 | + - Telemetry | |
| 2644 | 2794 | /batch_inference/chat_completion: |
| 2645 | 2795 | post: |
| 2646 | 2796 | parameters: [] |
| @@ -2870,7 +3020,7 @@ | ||
| 2870 | 3020 | $ref: '#/components/schemas/Artifact' |
| 2871 | 3021 | description: OK |
| 2872 | 3022 | tags: |
| 2873 | - - Observability | |
| 3023 | + - Telemetry | |
| 2874 | 3024 | /experiments/artifacts/upload: |
| 2875 | 3025 | post: |
| 2876 | 3026 | parameters: [] |
| @@ -2888,7 +3038,7 @@ | ||
| 2888 | 3038 | $ref: '#/components/schemas/Artifact' |
| 2889 | 3039 | description: OK |
| 2890 | 3040 | tags: |
| 2891 | - - Observability | |
| 3041 | + - Telemetry | |
| 2892 | 3042 | /experiments/create: |
| 2893 | 3043 | post: |
| 2894 | 3044 | parameters: [] |
| @@ -2906,7 +3056,7 @@ | ||
| 2906 | 3056 | $ref: '#/components/schemas/Experiment' |
| 2907 | 3057 | description: OK |
| 2908 | 3058 | tags: |
| 2909 | - - Observability | |
| 3059 | + - Telemetry | |
| 2910 | 3060 | /experiments/create_run: |
| 2911 | 3061 | post: |
| 2912 | 3062 | parameters: [] |
| @@ -2924,7 +3074,7 @@ | ||
| 2924 | 3074 | $ref: '#/components/schemas/Run' |
| 2925 | 3075 | description: OK |
| 2926 | 3076 | tags: |
| 2927 | - - Observability | |
| 3077 | + - Telemetry | |
| 2928 | 3078 | /experiments/get: |
| 2929 | 3079 | get: |
| 2930 | 3080 | parameters: |
| @@ -2941,7 +3091,7 @@ | ||
| 2941 | 3091 | $ref: '#/components/schemas/Experiment' |
| 2942 | 3092 | description: OK |
| 2943 | 3093 | tags: |
| 2944 | - - Observability | |
| 3094 | + - Telemetry | |
| 2945 | 3095 | /experiments/list: |
| 2946 | 3096 | get: |
| 2947 | 3097 | parameters: [] |
| @@ -2953,7 +3103,7 @@ | ||
| 2953 | 3103 | $ref: '#/components/schemas/Experiment' |
| 2954 | 3104 | description: OK |
| 2955 | 3105 | tags: |
| 2956 | - - Observability | |
| 3106 | + - Telemetry | |
| 2957 | 3107 | /experiments/update: |
| 2958 | 3108 | post: |
| 2959 | 3109 | parameters: [] |
| @@ -2971,7 +3121,7 @@ | ||
| 2971 | 3121 | $ref: '#/components/schemas/Experiment' |
| 2972 | 3122 | description: OK |
| 2973 | 3123 | tags: |
| 2974 | - - Observability | |
| 3124 | + - Telemetry | |
| 2975 | 3125 | /inference/chat_completion: |
| 2976 | 3126 | post: |
| 2977 | 3127 | parameters: [] |
| @@ -3043,7 +3193,7 @@ | ||
| 3043 | 3193 | $ref: '#/components/schemas/Log' |
| 3044 | 3194 | description: OK |
| 3045 | 3195 | tags: |
| 3046 | - - Observability | |
| 3196 | + - Telemetry | |
| 3047 | 3197 | /logging/log_messages: |
| 3048 | 3198 | post: |
| 3049 | 3199 | parameters: [] |
| @@ -3057,7 +3207,7 @@ | ||
| 3057 | 3207 | '200': |
| 3058 | 3208 | description: OK |
| 3059 | 3209 | tags: |
| 3060 | - - Observability | |
| 3210 | + - Telemetry | |
| 3061 | 3211 | /memory_bank/documents/delete: |
| 3062 | 3212 | post: |
| 3063 | 3213 | parameters: [] |
| @@ -3352,7 +3502,7 @@ | ||
| 3352 | 3502 | '200': |
| 3353 | 3503 | description: OK |
| 3354 | 3504 | tags: |
| 3355 | - - Observability | |
| 3505 | + - Telemetry | |
| 3356 | 3506 | /runs/metrics: |
| 3357 | 3507 | get: |
| 3358 | 3508 | parameters: |
| @@ -3369,7 +3519,7 @@ | ||
| 3369 | 3519 | $ref: '#/components/schemas/Metric' |
| 3370 | 3520 | description: OK |
| 3371 | 3521 | tags: |
| 3372 | - - Observability | |
| 3522 | + - Telemetry | |
| 3373 | 3523 | /runs/update: |
| 3374 | 3524 | post: |
| 3375 | 3525 | parameters: [] |
| @@ -3387,7 +3537,7 @@ | ||
| 3387 | 3537 | $ref: '#/components/schemas/Run' |
| 3388 | 3538 | description: OK |
| 3389 | 3539 | tags: |
| 3390 | - - Observability | |
| 3540 | + - Telemetry | |
| 3391 | 3541 | /synthetic_data_generation/generate: |
| 3392 | 3542 | post: |
| 3393 | 3543 | parameters: [] |
| @@ -3411,16 +3561,16 @@ | ||
| 3411 | 3561 | servers: |
| 3412 | 3562 | - url: http://any-hosted-llama-stack.com |
| 3413 | 3563 | tags: |
| 3414 | -- name: Observability | |
| 3564 | +- name: Telemetry | |
| 3565 | +- name: Evaluations | |
| 3566 | +- name: AgenticSystem | |
| 3415 | 3567 | - name: Inference |
| 3568 | +- name: BatchInference | |
| 3569 | +- name: PostTraining | |
| 3416 | 3570 | - name: Datasets |
| 3417 | 3571 | - name: Memory |
| 3418 | -- name: AgenticSystem | |
| 3419 | -- name: Evaluations | |
| 3420 | 3572 | - name: SyntheticDataGeneration |
| 3421 | 3573 | - name: RewardScoring |
| 3422 | -- name: PostTraining | |
| 3423 | -- name: BatchInference | |
| 3424 | 3574 | - description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest" |
| 3425 | 3575 | /> |
| 3426 | 3576 | name: BatchChatCompletionRequest |
| @@ -3525,9 +3675,6 @@ | ||
| 3525 | 3675 | - description: <SchemaDefinition schemaRef="#/components/schemas/FunctionCallToolDefinition" |
| 3526 | 3676 | /> |
| 3527 | 3677 | name: FunctionCallToolDefinition |
| 3528 | -- description: <SchemaDefinition schemaRef="#/components/schemas/MemoryToolDefinition" | |
| 3529 | - /> | |
| 3530 | - name: MemoryToolDefinition | |
| 3531 | 3678 | - description: <SchemaDefinition schemaRef="#/components/schemas/OnViolationAction" |
| 3532 | 3679 | /> |
| 3533 | 3680 | name: OnViolationAction |
| @@ -3852,10 +3999,10 @@ | ||
| 3852 | 3999 | - Evaluations |
| 3853 | 4000 | - Inference |
| 3854 | 4001 | - Memory |
| 3855 | - - Observability | |
| 3856 | 4002 | - PostTraining |
| 3857 | 4003 | - RewardScoring |
| 3858 | 4004 | - SyntheticDataGeneration |
| 4005 | + - Telemetry | |
| 3859 | 4006 | - name: Types |
| 3860 | 4007 | tags: |
| 3861 | 4008 | - AgentConfig |
| @@ -3931,7 +4078,6 @@ | ||
| 3931 | 4078 | - MemoryBank |
| 3932 | 4079 | - MemoryBankDocument |
| 3933 | 4080 | - MemoryRetrievalStep |
| 3934 | - - MemoryToolDefinition | |
| 3935 | 4081 | - Metric |
| 3936 | 4082 | - OnViolationAction |
| 3937 | 4083 | - OptimizerConfig |
modified rfcs/openapi_generator/run_openapi_generator.sh +1 −1
| @@ -28,4 +28,4 @@ | ||
| 28 | 28 | exit 1 |
| 29 | 29 | fi |
| 30 | 30 | |
| 31 | -PYTHONPATH=$PYTHONPATH:../.. python3 -m rfcs.openapi_generator.generate $* | |
| 31 | +PYTHONPATH=$PYTHONPATH:../.. python -m rfcs.openapi_generator.generate $* |