kikocis/llama-stack public
Changesets · Branches · Tags · Compare
| Changeset | f342ccdd2224aee53e7966f394c986748d41cc6fc3fe3c68d4448dad128877b5 |
|---|---|
| Author | Xi Yan <xiyan@meta.com> · 2024-09-12 15:03 -07:00 |
| Committer | GitHub <noreply@github.com> · 2024-09-12 15:03 -07:00 |
| Parents | 63314e75ef83 |
26 files changed
modified llama_toolchain/agentic_system/api/api.py +10 −1
| @@ -416,7 +416,16 @@ | ||
| 416 | 416 | @webmethod(route="/agentic_system/turn/create") |
| 417 | 417 | async def create_agentic_system_turn( |
| 418 | 418 | self, |
| 419 | - request: AgenticSystemTurnCreateRequest, | |
| 419 | + agent_id: str, | |
| 420 | + session_id: str, | |
| 421 | + messages: List[ | |
| 422 | + Union[ | |
| 423 | + UserMessage, | |
| 424 | + ToolResponseMessage, | |
| 425 | + ] | |
| 426 | + ], | |
| 427 | + attachments: Optional[List[Attachment]] = None, | |
| 428 | + stream: Optional[bool] = False, | |
| 420 | 429 | ) -> AgenticSystemTurnResponseStreamChunk: ... |
| 421 | 430 | |
| 422 | 431 | @webmethod(route="/agentic_system/turn/get") |
modified llama_toolchain/agentic_system/client.py +1 −3
| @@ -73,9 +73,7 @@ | ||
| 73 | 73 | async with client.stream( |
| 74 | 74 | "POST", |
| 75 | 75 | f"{self.base_url}/agentic_system/turn/create", |
| 76 | - json={ | |
| 77 | - "request": encodable_dict(request), | |
| 78 | - }, | |
| 76 | + json=encodable_dict(request), | |
| 79 | 77 | headers={"Content-Type": "application/json"}, |
| 80 | 78 | timeout=20, |
| 81 | 79 | ) as response: |
modified llama_toolchain/agentic_system/meta_reference/agent_instance.py +7 −9
| @@ -388,19 +388,17 @@ | ||
| 388 | 388 | ) |
| 389 | 389 | ) |
| 390 | 390 | |
| 391 | - req = ChatCompletionRequest( | |
| 392 | - model=self.agent_config.model, | |
| 393 | - messages=input_messages, | |
| 391 | + tool_calls = [] | |
| 392 | + content = "" | |
| 393 | + stop_reason = None | |
| 394 | + async for chunk in self.inference_api.chat_completion( | |
| 395 | + self.agent_config.model, | |
| 396 | + input_messages, | |
| 394 | 397 | tools=self._get_tools(), |
| 395 | 398 | tool_prompt_format=self.agent_config.tool_prompt_format, |
| 396 | 399 | stream=True, |
| 397 | 400 | sampling_params=sampling_params, |
| 398 | - ) | |
| 399 | - | |
| 400 | - tool_calls = [] | |
| 401 | - content = "" | |
| 402 | - stop_reason = None | |
| 403 | - async for chunk in self.inference_api.chat_completion(req): | |
| 401 | + ): | |
| 404 | 402 | event = chunk.event |
| 405 | 403 | if event.event_type == ChatCompletionResponseEventType.start: |
| 406 | 404 | continue |
modified llama_toolchain/agentic_system/meta_reference/agentic_system.py +19 −1
| @@ -114,8 +114,26 @@ | ||
| 114 | 114 | |
| 115 | 115 | async def create_agentic_system_turn( |
| 116 | 116 | self, |
| 117 | - request: AgenticSystemTurnCreateRequest, | |
| 117 | + agent_id: str, | |
| 118 | + session_id: str, | |
| 119 | + messages: List[ | |
| 120 | + Union[ | |
| 121 | + UserMessage, | |
| 122 | + ToolResponseMessage, | |
| 123 | + ] | |
| 124 | + ], | |
| 125 | + attachments: Optional[List[Attachment]] = None, | |
| 126 | + stream: Optional[bool] = False, | |
| 118 | 127 | ) -> AsyncGenerator: |
| 128 | + # wrapper request to make it easier to pass around (internal only, not exposed to API) | |
| 129 | + request = AgenticSystemTurnCreateRequest( | |
| 130 | + agent_id=agent_id, | |
| 131 | + session_id=session_id, | |
| 132 | + messages=messages, | |
| 133 | + attachments=attachments, | |
| 134 | + stream=stream, | |
| 135 | + ) | |
| 136 | + | |
| 119 | 137 | agent_id = request.agent_id |
| 120 | 138 | assert agent_id in AGENT_INSTANCES_BY_ID, f"System {agent_id} not found" |
| 121 | 139 | agent = AGENT_INSTANCES_BY_ID[agent_id] |
modified llama_toolchain/batch_inference/api/api.py +12 −2
| @@ -51,11 +51,21 @@ | ||
| 51 | 51 | @webmethod(route="/batch_inference/completion") |
| 52 | 52 | async def batch_completion( |
| 53 | 53 | self, |
| 54 | - request: BatchCompletionRequest, | |
| 54 | + model: str, | |
| 55 | + content_batch: List[InterleavedTextMedia], | |
| 56 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 57 | + logprobs: Optional[LogProbConfig] = None, | |
| 55 | 58 | ) -> BatchCompletionResponse: ... |
| 56 | 59 | |
| 57 | 60 | @webmethod(route="/batch_inference/chat_completion") |
| 58 | 61 | async def batch_chat_completion( |
| 59 | 62 | self, |
| 60 | - request: BatchChatCompletionRequest, | |
| 63 | + model: str, | |
| 64 | + messages_batch: List[List[Message]], | |
| 65 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 66 | + # zero-shot tool definitions as input to the model | |
| 67 | + tools: Optional[List[ToolDefinition]] = list, | |
| 68 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 69 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 70 | + logprobs: Optional[LogProbConfig] = None, | |
| 61 | 71 | ) -> BatchChatCompletionResponse: ... |
modified llama_toolchain/dataset/api/api.py +2 −1
| @@ -46,7 +46,8 @@ | ||
| 46 | 46 | @webmethod(route="/datasets/create") |
| 47 | 47 | def create_dataset( |
| 48 | 48 | self, |
| 49 | - request: CreateDatasetRequest, | |
| 49 | + uuid: str, | |
| 50 | + dataset: TrainEvalDataset, | |
| 50 | 51 | ) -> None: ... |
| 51 | 52 | |
| 52 | 53 | @webmethod(route="/datasets/get") |
modified llama_toolchain/evaluations/api/api.py +3 −3
| @@ -86,19 +86,19 @@ | ||
| 86 | 86 | @webmethod(route="/evaluate/text_generation/") |
| 87 | 87 | def evaluate_text_generation( |
| 88 | 88 | self, |
| 89 | - request: EvaluateTextGenerationRequest, | |
| 89 | + metrics: List[TextGenerationMetric], | |
| 90 | 90 | ) -> EvaluationJob: ... |
| 91 | 91 | |
| 92 | 92 | @webmethod(route="/evaluate/question_answering/") |
| 93 | 93 | def evaluate_question_answering( |
| 94 | 94 | self, |
| 95 | - request: EvaluateQuestionAnsweringRequest, | |
| 95 | + metrics: List[QuestionAnsweringMetric], | |
| 96 | 96 | ) -> EvaluationJob: ... |
| 97 | 97 | |
| 98 | 98 | @webmethod(route="/evaluate/summarization/") |
| 99 | 99 | def evaluate_summarization( |
| 100 | 100 | self, |
| 101 | - request: EvaluateSummarizationRequest, | |
| 101 | + metrics: List[SummarizationMetric], | |
| 102 | 102 | ) -> EvaluationJob: ... |
| 103 | 103 | |
| 104 | 104 | @webmethod(route="/evaluate/jobs") |
modified llama_toolchain/inference/adapters/fireworks/fireworks.py +22 −1
| @@ -76,7 +76,28 @@ | ||
| 76 | 76 | |
| 77 | 77 | return options |
| 78 | 78 | |
| 79 | - async def chat_completion(self, request: ChatCompletionRequest) -> AsyncGenerator: | |
| 79 | + async def chat_completion( | |
| 80 | + self, | |
| 81 | + model: str, | |
| 82 | + messages: List[Message], | |
| 83 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 84 | + tools: Optional[List[ToolDefinition]] = list(), | |
| 85 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 86 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 87 | + stream: Optional[bool] = False, | |
| 88 | + logprobs: Optional[LogProbConfig] = None, | |
| 89 | + ) -> AsyncGenerator: | |
| 90 | + request = ChatCompletionRequest( | |
| 91 | + model=model, | |
| 92 | + messages=messages, | |
| 93 | + sampling_params=sampling_params, | |
| 94 | + tools=tools, | |
| 95 | + tool_choice=tool_choice, | |
| 96 | + tool_prompt_format=tool_prompt_format, | |
| 97 | + stream=stream, | |
| 98 | + logprobs=logprobs, | |
| 99 | + ) | |
| 100 | + | |
| 80 | 101 | messages = prepare_messages(request) |
| 81 | 102 | |
| 82 | 103 | # accumulate sampling params and other options to pass to fireworks |
modified llama_toolchain/inference/adapters/ollama/ollama.py +22 −1
| @@ -84,7 +84,28 @@ | ||
| 84 | 84 | |
| 85 | 85 | return options |
| 86 | 86 | |
| 87 | - async def chat_completion(self, request: ChatCompletionRequest) -> AsyncGenerator: | |
| 87 | + async def chat_completion( | |
| 88 | + self, | |
| 89 | + model: str, | |
| 90 | + messages: List[Message], | |
| 91 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 92 | + tools: Optional[List[ToolDefinition]] = list(), | |
| 93 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 94 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 95 | + stream: Optional[bool] = False, | |
| 96 | + logprobs: Optional[LogProbConfig] = None, | |
| 97 | + ) -> AsyncGenerator: | |
| 98 | + request = ChatCompletionRequest( | |
| 99 | + model=model, | |
| 100 | + messages=messages, | |
| 101 | + sampling_params=sampling_params, | |
| 102 | + tools=tools, | |
| 103 | + tool_choice=tool_choice, | |
| 104 | + tool_prompt_format=tool_prompt_format, | |
| 105 | + stream=stream, | |
| 106 | + logprobs=logprobs, | |
| 107 | + ) | |
| 108 | + | |
| 88 | 109 | messages = prepare_messages(request) |
| 89 | 110 | # accumulate sampling params and other options to pass to ollama |
| 90 | 111 | options = self.get_ollama_chat_options(request) |
modified llama_toolchain/inference/adapters/tgi/tgi.py +22 −1
| @@ -82,7 +82,28 @@ | ||
| 82 | 82 | |
| 83 | 83 | return options |
| 84 | 84 | |
| 85 | - async def chat_completion(self, request: ChatCompletionRequest) -> AsyncGenerator: | |
| 85 | + async def chat_completion( | |
| 86 | + self, | |
| 87 | + model: str, | |
| 88 | + messages: List[Message], | |
| 89 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 90 | + tools: Optional[List[ToolDefinition]] = list(), | |
| 91 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 92 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 93 | + stream: Optional[bool] = False, | |
| 94 | + logprobs: Optional[LogProbConfig] = None, | |
| 95 | + ) -> AsyncGenerator: | |
| 96 | + request = ChatCompletionRequest( | |
| 97 | + model=model, | |
| 98 | + messages=messages, | |
| 99 | + sampling_params=sampling_params, | |
| 100 | + tools=tools, | |
| 101 | + tool_choice=tool_choice, | |
| 102 | + tool_prompt_format=tool_prompt_format, | |
| 103 | + stream=stream, | |
| 104 | + logprobs=logprobs, | |
| 105 | + ) | |
| 106 | + | |
| 86 | 107 | messages = prepare_messages(request) |
| 87 | 108 | model_input = self.formatter.encode_dialog_prompt(messages) |
| 88 | 109 | prompt = self.tokenizer.decode(model_input.tokens) |
modified llama_toolchain/inference/adapters/together/together.py +23 −1
| @@ -76,7 +76,29 @@ | ||
| 76 | 76 | |
| 77 | 77 | return options |
| 78 | 78 | |
| 79 | - async def chat_completion(self, request: ChatCompletionRequest) -> AsyncGenerator: | |
| 79 | + async def chat_completion( | |
| 80 | + self, | |
| 81 | + model: str, | |
| 82 | + messages: List[Message], | |
| 83 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 84 | + tools: Optional[List[ToolDefinition]] = list(), | |
| 85 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 86 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 87 | + stream: Optional[bool] = False, | |
| 88 | + logprobs: Optional[LogProbConfig] = None, | |
| 89 | + ) -> AsyncGenerator: | |
| 90 | + # wrapper request to make it easier to pass around (internal only, not exposed to API) | |
| 91 | + request = ChatCompletionRequest( | |
| 92 | + model=model, | |
| 93 | + messages=messages, | |
| 94 | + sampling_params=sampling_params, | |
| 95 | + tools=tools, | |
| 96 | + tool_choice=tool_choice, | |
| 97 | + tool_prompt_format=tool_prompt_format, | |
| 98 | + stream=stream, | |
| 99 | + logprobs=logprobs, | |
| 100 | + ) | |
| 101 | + | |
| 80 | 102 | # accumulate sampling params and other options to pass to together |
| 81 | 103 | options = self.get_together_chat_options(request) |
| 82 | 104 | together_model = self.resolve_together_model(request.model) |
modified llama_toolchain/inference/api/api.py +20 −2
| @@ -85,6 +85,8 @@ | ||
| 85 | 85 | |
| 86 | 86 | @json_schema_type |
| 87 | 87 | class CompletionResponse(BaseModel): |
| 88 | + """Completion response.""" | |
| 89 | + | |
| 88 | 90 | completion_message: CompletionMessage |
| 89 | 91 | logprobs: Optional[List[TokenLogProbs]] = None |
| 90 | 92 | |
| @@ -108,6 +110,8 @@ | ||
| 108 | 110 | |
| 109 | 111 | @json_schema_type |
| 110 | 112 | class BatchCompletionResponse(BaseModel): |
| 113 | + """Batch completion response.""" | |
| 114 | + | |
| 111 | 115 | completion_message_batch: List[CompletionMessage] |
| 112 | 116 | |
| 113 | 117 | |
| @@ -137,6 +141,8 @@ | ||
| 137 | 141 | |
| 138 | 142 | @json_schema_type |
| 139 | 143 | class ChatCompletionResponse(BaseModel): |
| 144 | + """Chat completion response.""" | |
| 145 | + | |
| 140 | 146 | completion_message: CompletionMessage |
| 141 | 147 | logprobs: Optional[List[TokenLogProbs]] = None |
| 142 | 148 | |
| @@ -170,13 +176,25 @@ | ||
| 170 | 176 | @webmethod(route="/inference/completion") |
| 171 | 177 | async def completion( |
| 172 | 178 | self, |
| 173 | - request: CompletionRequest, | |
| 179 | + model: str, | |
| 180 | + content: InterleavedTextMedia, | |
| 181 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 182 | + stream: Optional[bool] = False, | |
| 183 | + logprobs: Optional[LogProbConfig] = None, | |
| 174 | 184 | ) -> Union[CompletionResponse, CompletionResponseStreamChunk]: ... |
| 175 | 185 | |
| 176 | 186 | @webmethod(route="/inference/chat_completion") |
| 177 | 187 | async def chat_completion( |
| 178 | 188 | self, |
| 179 | - request: ChatCompletionRequest, | |
| 189 | + model: str, | |
| 190 | + messages: List[Message], | |
| 191 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 192 | + # zero-shot tool definitions as input to the model | |
| 193 | + tools: Optional[List[ToolDefinition]] = list, | |
| 194 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 195 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 196 | + stream: Optional[bool] = False, | |
| 197 | + logprobs: Optional[LogProbConfig] = None, | |
| 180 | 198 | ) -> Union[ChatCompletionResponse, ChatCompletionResponseStreamChunk]: ... |
| 181 | 199 | |
| 182 | 200 | @webmethod(route="/inference/embeddings") |
modified llama_toolchain/inference/client.py +3 −5
| @@ -10,10 +10,10 @@ | ||
| 10 | 10 | |
| 11 | 11 | import fire |
| 12 | 12 | import httpx |
| 13 | -from pydantic import BaseModel | |
| 14 | -from termcolor import cprint | |
| 15 | 13 | |
| 16 | 14 | from llama_toolchain.core.datatypes import RemoteProviderConfig |
| 15 | +from pydantic import BaseModel | |
| 16 | +from termcolor import cprint | |
| 17 | 17 | |
| 18 | 18 | from .api import ( |
| 19 | 19 | ChatCompletionRequest, |
| @@ -52,9 +52,7 @@ | ||
| 52 | 52 | async with client.stream( |
| 53 | 53 | "POST", |
| 54 | 54 | f"{self.base_url}/inference/chat_completion", |
| 55 | - json={ | |
| 56 | - "request": encodable_dict(request), | |
| 57 | - }, | |
| 55 | + json=encodable_dict(request), | |
| 58 | 56 | headers={"Content-Type": "application/json"}, |
| 59 | 57 | timeout=20, |
| 60 | 58 | ) as response: |
modified llama_toolchain/inference/meta_reference/inference.py +24 −1
| @@ -22,9 +22,12 @@ | ||
| 22 | 22 | ToolCallParseStatus, |
| 23 | 23 | ) |
| 24 | 24 | from llama_toolchain.inference.prepare_messages import prepare_messages |
| 25 | + | |
| 25 | 26 | from .config import MetaReferenceImplConfig |
| 26 | 27 | from .model_parallel import LlamaModelParallelGenerator |
| 27 | 28 | |
| 29 | +from llama_models.llama3.api.datatypes import * # noqa: F403 | |
| 30 | +from llama_toolchain.inference.api import * # noqa: F403 | |
| 28 | 31 | |
| 29 | 32 | # there's a single model parallel process running serving the model. for now, |
| 30 | 33 | # we don't support multiple concurrent requests to this process. |
| @@ -50,10 +53,30 @@ | ||
| 50 | 53 | # hm, when stream=False, we should not be doing SSE :/ which is what the |
| 51 | 54 | # top-level server is going to do. make the typing more specific here |
| 52 | 55 | async def chat_completion( |
| 53 | - self, request: ChatCompletionRequest | |
| 56 | + self, | |
| 57 | + model: str, | |
| 58 | + messages: List[Message], | |
| 59 | + sampling_params: Optional[SamplingParams] = SamplingParams(), | |
| 60 | + tools: Optional[List[ToolDefinition]] = list(), | |
| 61 | + tool_choice: Optional[ToolChoice] = ToolChoice.auto, | |
| 62 | + tool_prompt_format: Optional[ToolPromptFormat] = ToolPromptFormat.json, | |
| 63 | + stream: Optional[bool] = False, | |
| 64 | + logprobs: Optional[LogProbConfig] = None, | |
| 54 | 65 | ) -> AsyncIterator[ |
| 55 | 66 | Union[ChatCompletionResponseStreamChunk, ChatCompletionResponse] |
| 56 | 67 | ]: |
| 68 | + # wrapper request to make it easier to pass around (internal only, not exposed to API) | |
| 69 | + request = ChatCompletionRequest( | |
| 70 | + model=model, | |
| 71 | + messages=messages, | |
| 72 | + sampling_params=sampling_params, | |
| 73 | + tools=tools, | |
| 74 | + tool_choice=tool_choice, | |
| 75 | + tool_prompt_format=tool_prompt_format, | |
| 76 | + stream=stream, | |
| 77 | + logprobs=logprobs, | |
| 78 | + ) | |
| 79 | + | |
| 57 | 80 | messages = prepare_messages(request) |
| 58 | 81 | model = resolve_model(request.model) |
| 59 | 82 | if model is None: |
modified llama_toolchain/post_training/api/api.py +22 −2
| @@ -179,13 +179,33 @@ | ||
| 179 | 179 | @webmethod(route="/post_training/supervised_fine_tune") |
| 180 | 180 | def supervised_fine_tune( |
| 181 | 181 | self, |
| 182 | - request: PostTrainingSFTRequest, | |
| 182 | + job_uuid: str, | |
| 183 | + model: str, | |
| 184 | + dataset: TrainEvalDataset, | |
| 185 | + validation_dataset: TrainEvalDataset, | |
| 186 | + algorithm: FinetuningAlgorithm, | |
| 187 | + algorithm_config: Union[ | |
| 188 | + LoraFinetuningConfig, QLoraFinetuningConfig, DoraFinetuningConfig | |
| 189 | + ], | |
| 190 | + optimizer_config: OptimizerConfig, | |
| 191 | + training_config: TrainingConfig, | |
| 192 | + hyperparam_search_config: Dict[str, Any], | |
| 193 | + logger_config: Dict[str, Any], | |
| 183 | 194 | ) -> PostTrainingJob: ... |
| 184 | 195 | |
| 185 | 196 | @webmethod(route="/post_training/preference_optimize") |
| 186 | 197 | def preference_optimize( |
| 187 | 198 | self, |
| 188 | - request: PostTrainingRLHFRequest, | |
| 199 | + job_uuid: str, | |
| 200 | + finetuned_model: URL, | |
| 201 | + dataset: TrainEvalDataset, | |
| 202 | + validation_dataset: TrainEvalDataset, | |
| 203 | + algorithm: RLHFAlgorithm, | |
| 204 | + algorithm_config: Union[DPOAlignmentConfig], | |
| 205 | + optimizer_config: OptimizerConfig, | |
| 206 | + training_config: TrainingConfig, | |
| 207 | + hyperparam_search_config: Dict[str, Any], | |
| 208 | + logger_config: Dict[str, Any], | |
| 189 | 209 | ) -> PostTrainingJob: ... |
| 190 | 210 | |
| 191 | 211 | @webmethod(route="/post_training/jobs") |
modified llama_toolchain/reward_scoring/api/api.py +2 −1
| @@ -50,5 +50,6 @@ | ||
| 50 | 50 | @webmethod(route="/reward_scoring/score") |
| 51 | 51 | def reward_score( |
| 52 | 52 | self, |
| 53 | - request: RewardScoringRequest, | |
| 53 | + dialog_generations: List[DialogGenerations], | |
| 54 | + model: str, | |
| 54 | 55 | ) -> Union[RewardScoringResponse]: ... |
modified llama_toolchain/safety/api/api.py +2 −1
| @@ -86,5 +86,6 @@ | ||
| 86 | 86 | @webmethod(route="/safety/run_shields") |
| 87 | 87 | async def run_shields( |
| 88 | 88 | self, |
| 89 | - request: RunShieldRequest, | |
| 89 | + messages: List[Message], | |
| 90 | + shields: List[ShieldDefinition], | |
| 90 | 91 | ) -> RunShieldResponse: ... |
modified llama_toolchain/safety/client.py +3 −5
| @@ -13,10 +13,10 @@ | ||
| 13 | 13 | import httpx |
| 14 | 14 | |
| 15 | 15 | from llama_models.llama3.api.datatypes import UserMessage |
| 16 | -from pydantic import BaseModel | |
| 17 | -from termcolor import cprint | |
| 18 | 16 | |
| 19 | 17 | from llama_toolchain.core.datatypes import RemoteProviderConfig |
| 18 | +from pydantic import BaseModel | |
| 19 | +from termcolor import cprint | |
| 20 | 20 | |
| 21 | 21 | from .api import * # noqa: F403 |
| 22 | 22 | |
| @@ -43,9 +43,7 @@ | ||
| 43 | 43 | async with httpx.AsyncClient() as client: |
| 44 | 44 | response = await client.post( |
| 45 | 45 | f"{self.base_url}/safety/run_shields", |
| 46 | - json={ | |
| 47 | - "request": encodable_dict(request), | |
| 48 | - }, | |
| 46 | + json=encodable_dict(request), | |
| 49 | 47 | headers={"Content-Type": "application/json"}, |
| 50 | 48 | timeout=20, |
| 51 | 49 | ) |
modified llama_toolchain/safety/meta_reference/safety.py +4 −5
| @@ -52,13 +52,12 @@ | ||
| 52 | 52 | |
| 53 | 53 | async def run_shields( |
| 54 | 54 | self, |
| 55 | - request: RunShieldRequest, | |
| 55 | + messages: List[Message], | |
| 56 | + shields: List[ShieldDefinition], | |
| 56 | 57 | ) -> RunShieldResponse: |
| 57 | - shields = [shield_config_to_shield(c, self.config) for c in request.shields] | |
| 58 | + shields = [shield_config_to_shield(c, self.config) for c in shields] | |
| 58 | 59 | |
| 59 | - responses = await asyncio.gather( | |
| 60 | - *[shield.run(request.messages) for shield in shields] | |
| 61 | - ) | |
| 60 | + responses = await asyncio.gather(*[shield.run(messages) for shield in shields]) | |
| 62 | 61 | |
| 63 | 62 | return RunShieldResponse(responses=responses) |
| 64 | 63 |
modified llama_toolchain/synthetic_data_generation/api/api.py +3 −1
| @@ -48,5 +48,7 @@ | ||
| 48 | 48 | @webmethod(route="/synthetic_data_generation/generate") |
| 49 | 49 | def synthetic_data_generate( |
| 50 | 50 | self, |
| 51 | - request: SyntheticDataGenerationRequest, | |
| 51 | + dialogs: List[Message], | |
| 52 | + filtering_function: FilteringFunction = FilteringFunction.none, | |
| 53 | + model: Optional[str] = None, | |
| 52 | 54 | ) -> Union[SyntheticDataGenerationResponse]: ... |
modified llama_toolchain/telemetry/api/api.py +1 −1
| @@ -125,7 +125,7 @@ | ||
| 125 | 125 | |
| 126 | 126 | class Telemetry(Protocol): |
| 127 | 127 | @webmethod(route="/telemetry/log_event") |
| 128 | - async def log_event(self, event: Event): ... | |
| 128 | + async def log_event(self, event: Event) -> None: ... | |
| 129 | 129 | |
| 130 | 130 | @webmethod(route="/telemetry/get_trace", method="GET") |
| 131 | 131 | async def get_trace(self, trace_id: str) -> Trace: ... |
modified rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html +0 −0
Not shown: the file is larger than the hub shows, or this page holds as much as it shows. View the file.
modified rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml +388 −1176
| @@ -180,180 +180,6 @@ | ||
| 180 | 180 | required: |
| 181 | 181 | - step |
| 182 | 182 | type: object |
| 183 | - AgenticSystemTurnCreateRequest: | |
| 184 | - additionalProperties: false | |
| 185 | - properties: | |
| 186 | - agent_id: | |
| 187 | - type: string | |
| 188 | - attachments: | |
| 189 | - items: | |
| 190 | - $ref: '#/components/schemas/Attachment' | |
| 191 | - type: array | |
| 192 | - input_shields: | |
| 193 | - items: | |
| 194 | - $ref: '#/components/schemas/ShieldDefinition' | |
| 195 | - type: array | |
| 196 | - instructions: | |
| 197 | - type: string | |
| 198 | - messages: | |
| 199 | - items: | |
| 200 | - oneOf: | |
| 201 | - - $ref: '#/components/schemas/UserMessage' | |
| 202 | - - $ref: '#/components/schemas/ToolResponseMessage' | |
| 203 | - type: array | |
| 204 | - output_shields: | |
| 205 | - items: | |
| 206 | - $ref: '#/components/schemas/ShieldDefinition' | |
| 207 | - type: array | |
| 208 | - sampling_params: | |
| 209 | - $ref: '#/components/schemas/SamplingParams' | |
| 210 | - session_id: | |
| 211 | - type: string | |
| 212 | - stream: | |
| 213 | - type: boolean | |
| 214 | - tool_choice: | |
| 215 | - $ref: '#/components/schemas/ToolChoice' | |
| 216 | - tool_prompt_format: | |
| 217 | - $ref: '#/components/schemas/ToolPromptFormat' | |
| 218 | - tools: | |
| 219 | - items: | |
| 220 | - oneOf: | |
| 221 | - - $ref: '#/components/schemas/SearchToolDefinition' | |
| 222 | - - $ref: '#/components/schemas/WolframAlphaToolDefinition' | |
| 223 | - - $ref: '#/components/schemas/PhotogenToolDefinition' | |
| 224 | - - $ref: '#/components/schemas/CodeInterpreterToolDefinition' | |
| 225 | - - $ref: '#/components/schemas/FunctionCallToolDefinition' | |
| 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 | |
| 343 | - type: array | |
| 344 | - required: | |
| 345 | - - agent_id | |
| 346 | - - session_id | |
| 347 | - - messages | |
| 348 | - type: object | |
| 349 | - AgenticSystemTurnCreateRequestWrapper: | |
| 350 | - additionalProperties: false | |
| 351 | - properties: | |
| 352 | - request: | |
| 353 | - $ref: '#/components/schemas/AgenticSystemTurnCreateRequest' | |
| 354 | - required: | |
| 355 | - - request | |
| 356 | - type: object | |
| 357 | 183 | AgenticSystemTurnResponseEvent: |
| 358 | 184 | additionalProperties: false |
| 359 | 185 | properties: |
| @@ -480,49 +306,6 @@ | ||
| 480 | 306 | - event_type |
| 481 | 307 | - turn_id |
| 482 | 308 | type: object |
| 483 | - Artifact: | |
| 484 | - additionalProperties: false | |
| 485 | - properties: | |
| 486 | - created_at: | |
| 487 | - format: date-time | |
| 488 | - type: string | |
| 489 | - id: | |
| 490 | - type: string | |
| 491 | - metadata: | |
| 492 | - additionalProperties: | |
| 493 | - oneOf: | |
| 494 | - - type: 'null' | |
| 495 | - - type: boolean | |
| 496 | - - type: number | |
| 497 | - - type: string | |
| 498 | - - type: array | |
| 499 | - - type: object | |
| 500 | - type: object | |
| 501 | - name: | |
| 502 | - type: string | |
| 503 | - size: | |
| 504 | - type: integer | |
| 505 | - type: | |
| 506 | - $ref: '#/components/schemas/ArtifactType' | |
| 507 | - required: | |
| 508 | - - id | |
| 509 | - - name | |
| 510 | - - type | |
| 511 | - - size | |
| 512 | - - created_at | |
| 513 | - - metadata | |
| 514 | - type: object | |
| 515 | - ArtifactType: | |
| 516 | - enum: | |
| 517 | - - model | |
| 518 | - - dataset | |
| 519 | - - checkpoint | |
| 520 | - - plot | |
| 521 | - - metric | |
| 522 | - - config | |
| 523 | - - code | |
| 524 | - - other | |
| 525 | - type: string | |
| 526 | 309 | Attachment: |
| 527 | 310 | additionalProperties: false |
| 528 | 311 | properties: |
| @@ -574,14 +357,6 @@ | ||
| 574 | 357 | - model |
| 575 | 358 | - messages_batch |
| 576 | 359 | type: object |
| 577 | - BatchChatCompletionRequestWrapper: | |
| 578 | - additionalProperties: false | |
| 579 | - properties: | |
| 580 | - request: | |
| 581 | - $ref: '#/components/schemas/BatchChatCompletionRequest' | |
| 582 | - required: | |
| 583 | - - request | |
| 584 | - type: object | |
| 585 | 360 | BatchChatCompletionResponse: |
| 586 | 361 | additionalProperties: false |
| 587 | 362 | properties: |
| @@ -617,14 +392,6 @@ | ||
| 617 | 392 | - model |
| 618 | 393 | - content_batch |
| 619 | 394 | type: object |
| 620 | - BatchCompletionRequestWrapper: | |
| 621 | - additionalProperties: false | |
| 622 | - properties: | |
| 623 | - request: | |
| 624 | - $ref: '#/components/schemas/BatchCompletionRequest' | |
| 625 | - required: | |
| 626 | - - request | |
| 627 | - type: object | |
| 628 | 395 | BatchCompletionResponse: |
| 629 | 396 | additionalProperties: false |
| 630 | 397 | properties: |
| @@ -701,13 +468,18 @@ | ||
| 701 | 468 | - model |
| 702 | 469 | - messages |
| 703 | 470 | type: object |
| 704 | - ChatCompletionRequestWrapper: | |
| 471 | + ChatCompletionResponse: | |
| 705 | 472 | additionalProperties: false |
| 706 | 473 | properties: |
| 707 | - request: | |
| 708 | - $ref: '#/components/schemas/ChatCompletionRequest' | |
| 474 | + completion_message: | |
| 475 | + $ref: '#/components/schemas/CompletionMessage' | |
| 476 | + logprobs: | |
| 477 | + items: | |
| 478 | + $ref: '#/components/schemas/TokenLogProbs' | |
| 479 | + type: array | |
| 709 | 480 | required: |
| 710 | - - request | |
| 481 | + - completion_message | |
| 482 | + title: Chat completion response. | |
| 711 | 483 | type: object |
| 712 | 484 | ChatCompletionResponseEvent: |
| 713 | 485 | additionalProperties: false |
| @@ -817,13 +589,18 @@ | ||
| 817 | 589 | - model |
| 818 | 590 | - content |
| 819 | 591 | type: object |
| 820 | - CompletionRequestWrapper: | |
| 592 | + CompletionResponse: | |
| 821 | 593 | additionalProperties: false |
| 822 | 594 | properties: |
| 823 | - request: | |
| 824 | - $ref: '#/components/schemas/CompletionRequest' | |
| 595 | + completion_message: | |
| 596 | + $ref: '#/components/schemas/CompletionMessage' | |
| 597 | + logprobs: | |
| 598 | + items: | |
| 599 | + $ref: '#/components/schemas/TokenLogProbs' | |
| 600 | + type: array | |
| 825 | 601 | required: |
| 826 | - - request | |
| 602 | + - completion_message | |
| 603 | + title: Completion response. | |
| 827 | 604 | type: object |
| 828 | 605 | CompletionResponseStreamChunk: |
| 829 | 606 | additionalProperties: false |
| @@ -859,51 +636,40 @@ | ||
| 859 | 636 | - agent_id |
| 860 | 637 | - session_name |
| 861 | 638 | type: object |
| 862 | - CreateDatasetRequest: | |
| 639 | + CreateAgenticSystemTurnRequest: | |
| 863 | 640 | additionalProperties: false |
| 864 | 641 | properties: |
| 865 | - dataset: | |
| 866 | - $ref: '#/components/schemas/TrainEvalDataset' | |
| 867 | - uuid: | |
| 642 | + agent_id: | |
| 868 | 643 | type: string |
| 869 | - required: | |
| 870 | - - uuid | |
| 871 | - - dataset | |
| 872 | - title: Request to create a dataset. | |
| 873 | - type: object | |
| 874 | - CreateDatasetRequestWrapper: | |
| 875 | - additionalProperties: false | |
| 876 | - properties: | |
| 877 | - request: | |
| 878 | - $ref: '#/components/schemas/CreateDatasetRequest' | |
| 879 | - required: | |
| 880 | - - request | |
| 881 | - type: object | |
| 882 | - CreateExperimentRequest: | |
| 883 | - additionalProperties: false | |
| 884 | - properties: | |
| 885 | - metadata: | |
| 886 | - additionalProperties: | |
| 644 | + attachments: | |
| 645 | + items: | |
| 646 | + $ref: '#/components/schemas/Attachment' | |
| 647 | + type: array | |
| 648 | + messages: | |
| 649 | + items: | |
| 887 | 650 | oneOf: |
| 888 | - - type: 'null' | |
| 889 | - - type: boolean | |
| 890 | - - type: number | |
| 891 | - - type: string | |
| 892 | - - type: array | |
| 893 | - - type: object | |
| 894 | - type: object | |
| 895 | - name: | |
| 651 | + - $ref: '#/components/schemas/UserMessage' | |
| 652 | + - $ref: '#/components/schemas/ToolResponseMessage' | |
| 653 | + type: array | |
| 654 | + session_id: | |
| 896 | 655 | type: string |
| 656 | + stream: | |
| 657 | + type: boolean | |
| 897 | 658 | required: |
| 898 | - - name | |
| 659 | + - agent_id | |
| 660 | + - session_id | |
| 661 | + - messages | |
| 899 | 662 | type: object |
| 900 | - CreateExperimentRequestWrapper: | |
| 663 | + CreateDatasetRequest: | |
| 901 | 664 | additionalProperties: false |
| 902 | 665 | properties: |
| 903 | - request: | |
| 904 | - $ref: '#/components/schemas/CreateExperimentRequest' | |
| 666 | + dataset: | |
| 667 | + $ref: '#/components/schemas/TrainEvalDataset' | |
| 668 | + uuid: | |
| 669 | + type: string | |
| 905 | 670 | required: |
| 906 | - - request | |
| 671 | + - uuid | |
| 672 | + - dataset | |
| 907 | 673 | type: object |
| 908 | 674 | CreateMemoryBankRequest: |
| 909 | 675 | additionalProperties: false |
| @@ -958,32 +724,6 @@ | ||
| 958 | 724 | - name |
| 959 | 725 | - config |
| 960 | 726 | type: object |
| 961 | - CreateRunRequest: | |
| 962 | - additionalProperties: false | |
| 963 | - properties: | |
| 964 | - experiment_id: | |
| 965 | - type: string | |
| 966 | - metadata: | |
| 967 | - additionalProperties: | |
| 968 | - oneOf: | |
| 969 | - - type: 'null' | |
| 970 | - - type: boolean | |
| 971 | - - type: number | |
| 972 | - - type: string | |
| 973 | - - type: array | |
| 974 | - - type: object | |
| 975 | - type: object | |
| 976 | - required: | |
| 977 | - - experiment_id | |
| 978 | - type: object | |
| 979 | - CreateRunRequestWrapper: | |
| 980 | - additionalProperties: false | |
| 981 | - properties: | |
| 982 | - request: | |
| 983 | - $ref: '#/components/schemas/CreateRunRequest' | |
| 984 | - required: | |
| 985 | - - request | |
| 986 | - type: object | |
| 987 | 727 | DPOAlignmentConfig: |
| 988 | 728 | additionalProperties: false |
| 989 | 729 | properties: |
| @@ -1126,12 +866,6 @@ | ||
| 1126 | 866 | EvaluateQuestionAnsweringRequest: |
| 1127 | 867 | additionalProperties: false |
| 1128 | 868 | properties: |
| 1129 | - checkpoint: | |
| 1130 | - $ref: '#/components/schemas/Checkpoint' | |
| 1131 | - dataset: | |
| 1132 | - $ref: '#/components/schemas/TrainEvalDataset' | |
| 1133 | - job_uuid: | |
| 1134 | - type: string | |
| 1135 | 869 | metrics: |
| 1136 | 870 | items: |
| 1137 | 871 | enum: |
| @@ -1139,33 +873,12 @@ | ||
| 1139 | 873 | - f1 |
| 1140 | 874 | type: string |
| 1141 | 875 | type: array |
| 1142 | - sampling_params: | |
| 1143 | - $ref: '#/components/schemas/SamplingParams' | |
| 1144 | 876 | required: |
| 1145 | - - job_uuid | |
| 1146 | - - dataset | |
| 1147 | - - checkpoint | |
| 1148 | - - sampling_params | |
| 1149 | 877 | - metrics |
| 1150 | - title: Request to evaluate question answering. | |
| 1151 | - type: object | |
| 1152 | - EvaluateQuestionAnsweringRequestWrapper: | |
| 1153 | - additionalProperties: false | |
| 1154 | - properties: | |
| 1155 | - request: | |
| 1156 | - $ref: '#/components/schemas/EvaluateQuestionAnsweringRequest' | |
| 1157 | - required: | |
| 1158 | - - request | |
| 1159 | 878 | type: object |
| 1160 | 879 | EvaluateSummarizationRequest: |
| 1161 | 880 | additionalProperties: false |
| 1162 | 881 | properties: |
| 1163 | - checkpoint: | |
| 1164 | - $ref: '#/components/schemas/Checkpoint' | |
| 1165 | - dataset: | |
| 1166 | - $ref: '#/components/schemas/TrainEvalDataset' | |
| 1167 | - job_uuid: | |
| 1168 | - type: string | |
| 1169 | 882 | metrics: |
| 1170 | 883 | items: |
| 1171 | 884 | enum: |
| @@ -1173,33 +886,12 @@ | ||
| 1173 | 886 | - bleu |
| 1174 | 887 | type: string |
| 1175 | 888 | type: array |
| 1176 | - sampling_params: | |
| 1177 | - $ref: '#/components/schemas/SamplingParams' | |
| 1178 | 889 | required: |
| 1179 | - - job_uuid | |
| 1180 | - - dataset | |
| 1181 | - - checkpoint | |
| 1182 | - - sampling_params | |
| 1183 | 890 | - metrics |
| 1184 | - title: Request to evaluate summarization. | |
| 1185 | - type: object | |
| 1186 | - EvaluateSummarizationRequestWrapper: | |
| 1187 | - additionalProperties: false | |
| 1188 | - properties: | |
| 1189 | - request: | |
| 1190 | - $ref: '#/components/schemas/EvaluateSummarizationRequest' | |
| 1191 | - required: | |
| 1192 | - - request | |
| 1193 | 891 | type: object |
| 1194 | 892 | EvaluateTextGenerationRequest: |
| 1195 | 893 | additionalProperties: false |
| 1196 | 894 | properties: |
| 1197 | - checkpoint: | |
| 1198 | - $ref: '#/components/schemas/Checkpoint' | |
| 1199 | - dataset: | |
| 1200 | - $ref: '#/components/schemas/TrainEvalDataset' | |
| 1201 | - job_uuid: | |
| 1202 | - type: string | |
| 1203 | 895 | metrics: |
| 1204 | 896 | items: |
| 1205 | 897 | enum: |
| @@ -1208,23 +900,8 @@ | ||
| 1208 | 900 | - bleu |
| 1209 | 901 | type: string |
| 1210 | 902 | type: array |
| 1211 | - sampling_params: | |
| 1212 | - $ref: '#/components/schemas/SamplingParams' | |
| 1213 | 903 | required: |
| 1214 | - - job_uuid | |
| 1215 | - - dataset | |
| 1216 | - - checkpoint | |
| 1217 | - - sampling_params | |
| 1218 | 904 | - metrics |
| 1219 | - title: Request to evaluate text generation. | |
| 1220 | - type: object | |
| 1221 | - EvaluateTextGenerationRequestWrapper: | |
| 1222 | - additionalProperties: false | |
| 1223 | - properties: | |
| 1224 | - request: | |
| 1225 | - $ref: '#/components/schemas/EvaluateTextGenerationRequest' | |
| 1226 | - required: | |
| 1227 | - - request | |
| 1228 | 905 | type: object |
| 1229 | 906 | EvaluationJob: |
| 1230 | 907 | additionalProperties: false |
| @@ -1259,46 +936,6 @@ | ||
| 1259 | 936 | required: |
| 1260 | 937 | - job_uuid |
| 1261 | 938 | type: object |
| 1262 | - Experiment: | |
| 1263 | - additionalProperties: false | |
| 1264 | - properties: | |
| 1265 | - created_at: | |
| 1266 | - format: date-time | |
| 1267 | - type: string | |
| 1268 | - id: | |
| 1269 | - type: string | |
| 1270 | - metadata: | |
| 1271 | - additionalProperties: | |
| 1272 | - oneOf: | |
| 1273 | - - type: 'null' | |
| 1274 | - - type: boolean | |
| 1275 | - - type: number | |
| 1276 | - - type: string | |
| 1277 | - - type: array | |
| 1278 | - - type: object | |
| 1279 | - type: object | |
| 1280 | - name: | |
| 1281 | - type: string | |
| 1282 | - status: | |
| 1283 | - $ref: '#/components/schemas/ExperimentStatus' | |
| 1284 | - updated_at: | |
| 1285 | - format: date-time | |
| 1286 | - type: string | |
| 1287 | - required: | |
| 1288 | - - id | |
| 1289 | - - name | |
| 1290 | - - status | |
| 1291 | - - created_at | |
| 1292 | - - updated_at | |
| 1293 | - - metadata | |
| 1294 | - type: object | |
| 1295 | - ExperimentStatus: | |
| 1296 | - enum: | |
| 1297 | - - not_started | |
| 1298 | - - running | |
| 1299 | - - completed | |
| 1300 | - - failed | |
| 1301 | - type: string | |
| 1302 | 939 | FinetuningAlgorithm: |
| 1303 | 940 | enum: |
| 1304 | 941 | - full |
| @@ -1393,107 +1030,26 @@ | ||
| 1393 | 1030 | - bank_id |
| 1394 | 1031 | - documents |
| 1395 | 1032 | type: object |
| 1396 | - ListArtifactsRequest: | |
| 1397 | - additionalProperties: false | |
| 1398 | - properties: | |
| 1399 | - experiment_id: | |
| 1400 | - type: string | |
| 1401 | - required: | |
| 1402 | - - experiment_id | |
| 1403 | - type: object | |
| 1404 | - Log: | |
| 1405 | - additionalProperties: false | |
| 1406 | - properties: | |
| 1407 | - additional_info: | |
| 1408 | - additionalProperties: | |
| 1409 | - oneOf: | |
| 1410 | - - type: 'null' | |
| 1411 | - - type: boolean | |
| 1412 | - - type: number | |
| 1413 | - - type: string | |
| 1414 | - - type: array | |
| 1415 | - - type: object | |
| 1416 | - type: object | |
| 1417 | - level: | |
| 1418 | - type: string | |
| 1419 | - message: | |
| 1420 | - type: string | |
| 1421 | - timestamp: | |
| 1422 | - format: date-time | |
| 1423 | - type: string | |
| 1424 | - required: | |
| 1425 | - - message | |
| 1426 | - - level | |
| 1427 | - - timestamp | |
| 1428 | - - additional_info | |
| 1429 | - type: object | |
| 1430 | - LogMessagesRequest: | |
| 1431 | - additionalProperties: false | |
| 1432 | - properties: | |
| 1433 | - logs: | |
| 1434 | - items: | |
| 1435 | - $ref: '#/components/schemas/Log' | |
| 1436 | - type: array | |
| 1437 | - run_id: | |
| 1438 | - type: string | |
| 1439 | - required: | |
| 1440 | - - logs | |
| 1441 | - type: object | |
| 1442 | - LogMessagesRequestWrapper: | |
| 1443 | - additionalProperties: false | |
| 1444 | - properties: | |
| 1445 | - request: | |
| 1446 | - $ref: '#/components/schemas/LogMessagesRequest' | |
| 1447 | - required: | |
| 1448 | - - request | |
| 1449 | - type: object | |
| 1450 | - LogMetricsRequest: | |
| 1451 | - additionalProperties: false | |
| 1452 | - properties: | |
| 1453 | - metrics: | |
| 1454 | - items: | |
| 1455 | - $ref: '#/components/schemas/Metric' | |
| 1456 | - type: array | |
| 1457 | - run_id: | |
| 1458 | - type: string | |
| 1459 | - required: | |
| 1460 | - - run_id | |
| 1461 | - - metrics | |
| 1462 | - type: object | |
| 1463 | - LogMetricsRequestWrapper: | |
| 1464 | - additionalProperties: false | |
| 1465 | - properties: | |
| 1466 | - request: | |
| 1467 | - $ref: '#/components/schemas/LogMetricsRequest' | |
| 1468 | - required: | |
| 1469 | - - request | |
| 1470 | - type: object | |
| 1471 | - LogSearchRequest: | |
| 1472 | - additionalProperties: false | |
| 1473 | - properties: | |
| 1474 | - filters: | |
| 1475 | - additionalProperties: | |
| 1476 | - oneOf: | |
| 1477 | - - type: 'null' | |
| 1478 | - - type: boolean | |
| 1479 | - - type: number | |
| 1480 | - - type: string | |
| 1481 | - - type: array | |
| 1482 | - - type: object | |
| 1483 | - type: object | |
| 1484 | - query: | |
| 1485 | - type: string | |
| 1486 | - required: | |
| 1487 | - - query | |
| 1488 | - type: object | |
| 1489 | - LogSearchRequestWrapper: | |
| 1033 | + LogEventRequest: | |
| 1490 | 1034 | additionalProperties: false |
| 1491 | 1035 | properties: |
| 1492 | - request: | |
| 1493 | - $ref: '#/components/schemas/LogSearchRequest' | |
| 1036 | + event: | |
| 1037 | + oneOf: | |
| 1038 | + - $ref: '#/components/schemas/UnstructuredLogEvent' | |
| 1039 | + - $ref: '#/components/schemas/MetricEvent' | |
| 1040 | + - $ref: '#/components/schemas/StructuredLogEvent' | |
| 1494 | 1041 | required: |
| 1495 | - - request | |
| 1042 | + - event | |
| 1496 | 1043 | type: object |
| 1044 | + LogSeverity: | |
| 1045 | + enum: | |
| 1046 | + - verbose | |
| 1047 | + - debug | |
| 1048 | + - info | |
| 1049 | + - warn | |
| 1050 | + - error | |
| 1051 | + - critical | |
| 1052 | + type: string | |
| 1497 | 1053 | LoraFinetuningConfig: |
| 1498 | 1054 | additionalProperties: false |
| 1499 | 1055 | properties: |
| @@ -1635,27 +1191,45 @@ | ||
| 1635 | 1191 | - memory_bank_ids |
| 1636 | 1192 | - inserted_context |
| 1637 | 1193 | type: object |
| 1638 | - Metric: | |
| 1194 | + MetricEvent: | |
| 1639 | 1195 | additionalProperties: false |
| 1640 | 1196 | properties: |
| 1641 | - name: | |
| 1197 | + attributes: | |
| 1198 | + additionalProperties: | |
| 1199 | + oneOf: | |
| 1200 | + - type: 'null' | |
| 1201 | + - type: boolean | |
| 1202 | + - type: number | |
| 1203 | + - type: string | |
| 1204 | + - type: array | |
| 1205 | + - type: object | |
| 1206 | + type: object | |
| 1207 | + metric: | |
| 1642 | 1208 | type: string |
| 1643 | - run_id: | |
| 1209 | + span_id: | |
| 1644 | 1210 | type: string |
| 1645 | 1211 | timestamp: |
| 1646 | 1212 | format: date-time |
| 1647 | 1213 | type: string |
| 1214 | + trace_id: | |
| 1215 | + type: string | |
| 1216 | + type: | |
| 1217 | + const: metric | |
| 1218 | + type: string | |
| 1219 | + unit: | |
| 1220 | + type: string | |
| 1648 | 1221 | value: |
| 1649 | 1222 | oneOf: |
| 1650 | - - type: number | |
| 1651 | 1223 | - type: integer |
| 1652 | - - type: string | |
| 1653 | - - type: boolean | |
| 1224 | + - type: number | |
| 1654 | 1225 | required: |
| 1655 | - - name | |
| 1656 | - - value | |
| 1226 | + - trace_id | |
| 1227 | + - span_id | |
| 1657 | 1228 | - timestamp |
| 1658 | - - run_id | |
| 1229 | + - type | |
| 1230 | + - metric | |
| 1231 | + - value | |
| 1232 | + - unit | |
| 1659 | 1233 | type: object |
| 1660 | 1234 | OnViolationAction: |
| 1661 | 1235 | enum: |
| @@ -1782,7 +1356,7 @@ | ||
| 1782 | 1356 | - checkpoints |
| 1783 | 1357 | title: Status of a finetuning job. |
| 1784 | 1358 | type: object |
| 1785 | - PostTrainingRLHFRequest: | |
| 1359 | + PreferenceOptimizeRequest: | |
| 1786 | 1360 | additionalProperties: false |
| 1787 | 1361 | properties: |
| 1788 | 1362 | algorithm: |
| @@ -1823,70 +1397,7 @@ | ||
| 1823 | 1397 | $ref: '#/components/schemas/TrainEvalDataset' |
| 1824 | 1398 | required: |
| 1825 | 1399 | - job_uuid |
| 1826 | - - finetuned_model | |
| 1827 | - - dataset | |
| 1828 | - - validation_dataset | |
| 1829 | - - algorithm | |
| 1830 | - - algorithm_config | |
| 1831 | - - optimizer_config | |
| 1832 | - - training_config | |
| 1833 | - - hyperparam_search_config | |
| 1834 | - - logger_config | |
| 1835 | - title: Request to finetune a model. | |
| 1836 | - type: object | |
| 1837 | - PostTrainingRLHFRequestWrapper: | |
| 1838 | - additionalProperties: false | |
| 1839 | - properties: | |
| 1840 | - request: | |
| 1841 | - $ref: '#/components/schemas/PostTrainingRLHFRequest' | |
| 1842 | - required: | |
| 1843 | - - request | |
| 1844 | - type: object | |
| 1845 | - PostTrainingSFTRequest: | |
| 1846 | - additionalProperties: false | |
| 1847 | - properties: | |
| 1848 | - algorithm: | |
| 1849 | - $ref: '#/components/schemas/FinetuningAlgorithm' | |
| 1850 | - algorithm_config: | |
| 1851 | - oneOf: | |
| 1852 | - - $ref: '#/components/schemas/LoraFinetuningConfig' | |
| 1853 | - - $ref: '#/components/schemas/QLoraFinetuningConfig' | |
| 1854 | - - $ref: '#/components/schemas/DoraFinetuningConfig' | |
| 1855 | - dataset: | |
| 1856 | - $ref: '#/components/schemas/TrainEvalDataset' | |
| 1857 | - hyperparam_search_config: | |
| 1858 | - additionalProperties: | |
| 1859 | - oneOf: | |
| 1860 | - - type: 'null' | |
| 1861 | - - type: boolean | |
| 1862 | - - type: number | |
| 1863 | - - type: string | |
| 1864 | - - type: array | |
| 1865 | - - type: object | |
| 1866 | - type: object | |
| 1867 | - job_uuid: | |
| 1868 | - type: string | |
| 1869 | - logger_config: | |
| 1870 | - additionalProperties: | |
| 1871 | - oneOf: | |
| 1872 | - - type: 'null' | |
| 1873 | - - type: boolean | |
| 1874 | - - type: number | |
| 1875 | - - type: string | |
| 1876 | - - type: array | |
| 1877 | - - type: object | |
| 1878 | - type: object | |
| 1879 | - model: | |
| 1880 | - type: string | |
| 1881 | - optimizer_config: | |
| 1882 | - $ref: '#/components/schemas/OptimizerConfig' | |
| 1883 | - training_config: | |
| 1884 | - $ref: '#/components/schemas/TrainingConfig' | |
| 1885 | - validation_dataset: | |
| 1886 | - $ref: '#/components/schemas/TrainEvalDataset' | |
| 1887 | - required: | |
| 1888 | - - job_uuid | |
| 1889 | - - model | |
| 1400 | + - finetuned_model | |
| 1890 | 1401 | - dataset |
| 1891 | 1402 | - validation_dataset |
| 1892 | 1403 | - algorithm |
| @@ -1895,15 +1406,6 @@ | ||
| 1895 | 1406 | - training_config |
| 1896 | 1407 | - hyperparam_search_config |
| 1897 | 1408 | - logger_config |
| 1898 | - title: Request to finetune a model. | |
| 1899 | - type: object | |
| 1900 | - PostTrainingSFTRequestWrapper: | |
| 1901 | - additionalProperties: false | |
| 1902 | - properties: | |
| 1903 | - request: | |
| 1904 | - $ref: '#/components/schemas/PostTrainingSFTRequest' | |
| 1905 | - required: | |
| 1906 | - - request | |
| 1907 | 1409 | type: object |
| 1908 | 1410 | QLoraFinetuningConfig: |
| 1909 | 1411 | additionalProperties: false |
| @@ -2035,7 +1537,7 @@ | ||
| 2035 | 1537 | - PUT |
| 2036 | 1538 | - DELETE |
| 2037 | 1539 | type: string |
| 2038 | - RewardScoringRequest: | |
| 1540 | + RewardScoreRequest: | |
| 2039 | 1541 | additionalProperties: false |
| 2040 | 1542 | properties: |
| 2041 | 1543 | dialog_generations: |
| @@ -2047,16 +1549,6 @@ | ||
| 2047 | 1549 | required: |
| 2048 | 1550 | - dialog_generations |
| 2049 | 1551 | - model |
| 2050 | - title: Request to score a reward function. A list of prompts and a list of responses | |
| 2051 | - per prompt. | |
| 2052 | - type: object | |
| 2053 | - RewardScoringRequestWrapper: | |
| 2054 | - additionalProperties: false | |
| 2055 | - properties: | |
| 2056 | - request: | |
| 2057 | - $ref: '#/components/schemas/RewardScoringRequest' | |
| 2058 | - required: | |
| 2059 | - - request | |
| 2060 | 1552 | type: object |
| 2061 | 1553 | RewardScoringResponse: |
| 2062 | 1554 | additionalProperties: false |
| @@ -2070,39 +1562,17 @@ | ||
| 2070 | 1562 | title: Response from the reward scoring. Batch of (prompt, response, score) |
| 2071 | 1563 | tuples that pass the threshold. |
| 2072 | 1564 | type: object |
| 2073 | - Run: | |
| 1565 | + RunShieldResponse: | |
| 2074 | 1566 | additionalProperties: false |
| 2075 | 1567 | properties: |
| 2076 | - ended_at: | |
| 2077 | - format: date-time | |
| 2078 | - type: string | |
| 2079 | - experiment_id: | |
| 2080 | - type: string | |
| 2081 | - id: | |
| 2082 | - type: string | |
| 2083 | - metadata: | |
| 2084 | - additionalProperties: | |
| 2085 | - oneOf: | |
| 2086 | - - type: 'null' | |
| 2087 | - - type: boolean | |
| 2088 | - - type: number | |
| 2089 | - - type: string | |
| 2090 | - - type: array | |
| 2091 | - - type: object | |
| 2092 | - type: object | |
| 2093 | - started_at: | |
| 2094 | - format: date-time | |
| 2095 | - type: string | |
| 2096 | - status: | |
| 2097 | - type: string | |
| 1568 | + responses: | |
| 1569 | + items: | |
| 1570 | + $ref: '#/components/schemas/ShieldResponse' | |
| 1571 | + type: array | |
| 2098 | 1572 | required: |
| 2099 | - - id | |
| 2100 | - - experiment_id | |
| 2101 | - - status | |
| 2102 | - - started_at | |
| 2103 | - - metadata | |
| 1573 | + - responses | |
| 2104 | 1574 | type: object |
| 2105 | - RunShieldRequest: | |
| 1575 | + RunShieldsRequest: | |
| 2106 | 1576 | additionalProperties: false |
| 2107 | 1577 | properties: |
| 2108 | 1578 | messages: |
| @@ -2121,24 +1591,6 @@ | ||
| 2121 | 1591 | - messages |
| 2122 | 1592 | - shields |
| 2123 | 1593 | type: object |
| 2124 | - RunShieldRequestWrapper: | |
| 2125 | - additionalProperties: false | |
| 2126 | - properties: | |
| 2127 | - request: | |
| 2128 | - $ref: '#/components/schemas/RunShieldRequest' | |
| 2129 | - required: | |
| 2130 | - - request | |
| 2131 | - type: object | |
| 2132 | - RunShieldResponse: | |
| 2133 | - additionalProperties: false | |
| 2134 | - properties: | |
| 2135 | - responses: | |
| 2136 | - items: | |
| 2137 | - $ref: '#/components/schemas/ShieldResponse' | |
| 2138 | - type: array | |
| 2139 | - required: | |
| 2140 | - - responses | |
| 2141 | - type: object | |
| 2142 | 1594 | SamplingParams: |
| 2143 | 1595 | additionalProperties: false |
| 2144 | 1596 | properties: |
| @@ -2307,13 +1759,132 @@ | ||
| 2307 | 1759 | - shield_type |
| 2308 | 1760 | - is_violation |
| 2309 | 1761 | type: object |
| 1762 | + SpanEndPayload: | |
| 1763 | + additionalProperties: false | |
| 1764 | + properties: | |
| 1765 | + status: | |
| 1766 | + $ref: '#/components/schemas/SpanStatus' | |
| 1767 | + type: | |
| 1768 | + const: span_end | |
| 1769 | + type: string | |
| 1770 | + required: | |
| 1771 | + - type | |
| 1772 | + - status | |
| 1773 | + type: object | |
| 1774 | + SpanStartPayload: | |
| 1775 | + additionalProperties: false | |
| 1776 | + properties: | |
| 1777 | + name: | |
| 1778 | + type: string | |
| 1779 | + parent_span_id: | |
| 1780 | + type: string | |
| 1781 | + type: | |
| 1782 | + const: span_start | |
| 1783 | + type: string | |
| 1784 | + required: | |
| 1785 | + - type | |
| 1786 | + - name | |
| 1787 | + type: object | |
| 1788 | + SpanStatus: | |
| 1789 | + enum: | |
| 1790 | + - ok | |
| 1791 | + - error | |
| 1792 | + type: string | |
| 2310 | 1793 | StopReason: |
| 2311 | 1794 | enum: |
| 2312 | 1795 | - end_of_turn |
| 2313 | 1796 | - end_of_message |
| 2314 | 1797 | - out_of_tokens |
| 2315 | 1798 | type: string |
| 2316 | - SyntheticDataGenerationRequest: | |
| 1799 | + StructuredLogEvent: | |
| 1800 | + additionalProperties: false | |
| 1801 | + properties: | |
| 1802 | + attributes: | |
| 1803 | + additionalProperties: | |
| 1804 | + oneOf: | |
| 1805 | + - type: 'null' | |
| 1806 | + - type: boolean | |
| 1807 | + - type: number | |
| 1808 | + - type: string | |
| 1809 | + - type: array | |
| 1810 | + - type: object | |
| 1811 | + type: object | |
| 1812 | + payload: | |
| 1813 | + oneOf: | |
| 1814 | + - $ref: '#/components/schemas/SpanStartPayload' | |
| 1815 | + - $ref: '#/components/schemas/SpanEndPayload' | |
| 1816 | + span_id: | |
| 1817 | + type: string | |
| 1818 | + timestamp: | |
| 1819 | + format: date-time | |
| 1820 | + type: string | |
| 1821 | + trace_id: | |
| 1822 | + type: string | |
| 1823 | + type: | |
| 1824 | + const: structured_log | |
| 1825 | + type: string | |
| 1826 | + required: | |
| 1827 | + - trace_id | |
| 1828 | + - span_id | |
| 1829 | + - timestamp | |
| 1830 | + - type | |
| 1831 | + - payload | |
| 1832 | + type: object | |
| 1833 | + SupervisedFineTuneRequest: | |
| 1834 | + additionalProperties: false | |
| 1835 | + properties: | |
| 1836 | + algorithm: | |
| 1837 | + $ref: '#/components/schemas/FinetuningAlgorithm' | |
| 1838 | + algorithm_config: | |
| 1839 | + oneOf: | |
| 1840 | + - $ref: '#/components/schemas/LoraFinetuningConfig' | |
| 1841 | + - $ref: '#/components/schemas/QLoraFinetuningConfig' | |
| 1842 | + - $ref: '#/components/schemas/DoraFinetuningConfig' | |
| 1843 | + dataset: | |
| 1844 | + $ref: '#/components/schemas/TrainEvalDataset' | |
| 1845 | + hyperparam_search_config: | |
| 1846 | + additionalProperties: | |
| 1847 | + oneOf: | |
| 1848 | + - type: 'null' | |
| 1849 | + - type: boolean | |
| 1850 | + - type: number | |
| 1851 | + - type: string | |
| 1852 | + - type: array | |
| 1853 | + - type: object | |
| 1854 | + type: object | |
| 1855 | + job_uuid: | |
| 1856 | + type: string | |
| 1857 | + logger_config: | |
| 1858 | + additionalProperties: | |
| 1859 | + oneOf: | |
| 1860 | + - type: 'null' | |
| 1861 | + - type: boolean | |
| 1862 | + - type: number | |
| 1863 | + - type: string | |
| 1864 | + - type: array | |
| 1865 | + - type: object | |
| 1866 | + type: object | |
| 1867 | + model: | |
| 1868 | + type: string | |
| 1869 | + optimizer_config: | |
| 1870 | + $ref: '#/components/schemas/OptimizerConfig' | |
| 1871 | + training_config: | |
| 1872 | + $ref: '#/components/schemas/TrainingConfig' | |
| 1873 | + validation_dataset: | |
| 1874 | + $ref: '#/components/schemas/TrainEvalDataset' | |
| 1875 | + required: | |
| 1876 | + - job_uuid | |
| 1877 | + - model | |
| 1878 | + - dataset | |
| 1879 | + - validation_dataset | |
| 1880 | + - algorithm | |
| 1881 | + - algorithm_config | |
| 1882 | + - optimizer_config | |
| 1883 | + - training_config | |
| 1884 | + - hyperparam_search_config | |
| 1885 | + - logger_config | |
| 1886 | + type: object | |
| 1887 | + SyntheticDataGenerateRequest: | |
| 2317 | 1888 | additionalProperties: false |
| 2318 | 1889 | properties: |
| 2319 | 1890 | dialogs: |
| @@ -2339,16 +1910,6 @@ | ||
| 2339 | 1910 | required: |
| 2340 | 1911 | - dialogs |
| 2341 | 1912 | - filtering_function |
| 2342 | - title: Request to generate synthetic data. A small batch of prompts and a filtering | |
| 2343 | - function | |
| 2344 | - type: object | |
| 2345 | - SyntheticDataGenerationRequestWrapper: | |
| 2346 | - additionalProperties: false | |
| 2347 | - properties: | |
| 2348 | - request: | |
| 2349 | - $ref: '#/components/schemas/SyntheticDataGenerationRequest' | |
| 2350 | - required: | |
| 2351 | - - request | |
| 2352 | 1913 | type: object |
| 2353 | 1914 | SyntheticDataGenerationResponse: |
| 2354 | 1915 | additionalProperties: false |
| @@ -2580,6 +2141,24 @@ | ||
| 2580 | 2141 | - tool_name |
| 2581 | 2142 | - content |
| 2582 | 2143 | type: object |
| 2144 | + Trace: | |
| 2145 | + additionalProperties: false | |
| 2146 | + properties: | |
| 2147 | + end_time: | |
| 2148 | + format: date-time | |
| 2149 | + type: string | |
| 2150 | + root_span_id: | |
| 2151 | + type: string | |
| 2152 | + start_time: | |
| 2153 | + format: date-time | |
| 2154 | + type: string | |
| 2155 | + trace_id: | |
| 2156 | + type: string | |
| 2157 | + required: | |
| 2158 | + - trace_id | |
| 2159 | + - root_span_id | |
| 2160 | + - start_time | |
| 2161 | + type: object | |
| 2583 | 2162 | TrainEvalDataset: |
| 2584 | 2163 | additionalProperties: false |
| 2585 | 2164 | properties: |
| @@ -2685,54 +2264,10 @@ | ||
| 2685 | 2264 | format: uri |
| 2686 | 2265 | pattern: ^(https?://|file://|data:) |
| 2687 | 2266 | type: string |
| 2688 | - UpdateDocumentsRequest: | |
| 2689 | - additionalProperties: false | |
| 2690 | - properties: | |
| 2691 | - bank_id: | |
| 2692 | - type: string | |
| 2693 | - documents: | |
| 2694 | - items: | |
| 2695 | - $ref: '#/components/schemas/MemoryBankDocument' | |
| 2696 | - type: array | |
| 2697 | - required: | |
| 2698 | - - bank_id | |
| 2699 | - - documents | |
| 2700 | - type: object | |
| 2701 | - UpdateExperimentRequest: | |
| 2702 | - additionalProperties: false | |
| 2703 | - properties: | |
| 2704 | - experiment_id: | |
| 2705 | - type: string | |
| 2706 | - metadata: | |
| 2707 | - additionalProperties: | |
| 2708 | - oneOf: | |
| 2709 | - - type: 'null' | |
| 2710 | - - type: boolean | |
| 2711 | - - type: number | |
| 2712 | - - type: string | |
| 2713 | - - type: array | |
| 2714 | - - type: object | |
| 2715 | - type: object | |
| 2716 | - status: | |
| 2717 | - $ref: '#/components/schemas/ExperimentStatus' | |
| 2718 | - required: | |
| 2719 | - - experiment_id | |
| 2720 | - type: object | |
| 2721 | - UpdateExperimentRequestWrapper: | |
| 2722 | - additionalProperties: false | |
| 2723 | - properties: | |
| 2724 | - request: | |
| 2725 | - $ref: '#/components/schemas/UpdateExperimentRequest' | |
| 2726 | - required: | |
| 2727 | - - request | |
| 2728 | - type: object | |
| 2729 | - UpdateRunRequest: | |
| 2267 | + UnstructuredLogEvent: | |
| 2730 | 2268 | additionalProperties: false |
| 2731 | 2269 | properties: |
| 2732 | - ended_at: | |
| 2733 | - format: date-time | |
| 2734 | - type: string | |
| 2735 | - metadata: | |
| 2270 | + attributes: | |
| 2736 | 2271 | additionalProperties: |
| 2737 | 2272 | oneOf: |
| 2738 | 2273 | - type: 'null' |
| @@ -2742,56 +2277,40 @@ | ||
| 2742 | 2277 | - type: array |
| 2743 | 2278 | - type: object |
| 2744 | 2279 | type: object |
| 2745 | - run_id: | |
| 2746 | - type: string | |
| 2747 | - status: | |
| 2280 | + message: | |
| 2748 | 2281 | type: string |
| 2749 | - required: | |
| 2750 | - - run_id | |
| 2751 | - type: object | |
| 2752 | - UpdateRunRequestWrapper: | |
| 2753 | - additionalProperties: false | |
| 2754 | - properties: | |
| 2755 | - request: | |
| 2756 | - $ref: '#/components/schemas/UpdateRunRequest' | |
| 2757 | - required: | |
| 2758 | - - request | |
| 2759 | - type: object | |
| 2760 | - UploadArtifactRequest: | |
| 2761 | - additionalProperties: false | |
| 2762 | - properties: | |
| 2763 | - artifact_type: | |
| 2282 | + severity: | |
| 2283 | + $ref: '#/components/schemas/LogSeverity' | |
| 2284 | + span_id: | |
| 2764 | 2285 | type: string |
| 2765 | - content: | |
| 2766 | - contentEncoding: base64 | |
| 2286 | + timestamp: | |
| 2287 | + format: date-time | |
| 2767 | 2288 | type: string |
| 2768 | - experiment_id: | |
| 2289 | + trace_id: | |
| 2769 | 2290 | type: string |
| 2770 | - metadata: | |
| 2771 | - additionalProperties: | |
| 2772 | - oneOf: | |
| 2773 | - - type: 'null' | |
| 2774 | - - type: boolean | |
| 2775 | - - type: number | |
| 2776 | - - type: string | |
| 2777 | - - type: array | |
| 2778 | - - type: object | |
| 2779 | - type: object | |
| 2780 | - name: | |
| 2291 | + type: | |
| 2292 | + const: unstructured_log | |
| 2781 | 2293 | type: string |
| 2782 | 2294 | required: |
| 2783 | - - experiment_id | |
| 2784 | - - name | |
| 2785 | - - artifact_type | |
| 2786 | - - content | |
| 2295 | + - trace_id | |
| 2296 | + - span_id | |
| 2297 | + - timestamp | |
| 2298 | + - type | |
| 2299 | + - message | |
| 2300 | + - severity | |
| 2787 | 2301 | type: object |
| 2788 | - UploadArtifactRequestWrapper: | |
| 2302 | + UpdateDocumentsRequest: | |
| 2789 | 2303 | additionalProperties: false |
| 2790 | 2304 | properties: |
| 2791 | - request: | |
| 2792 | - $ref: '#/components/schemas/UploadArtifactRequest' | |
| 2305 | + bank_id: | |
| 2306 | + type: string | |
| 2307 | + documents: | |
| 2308 | + items: | |
| 2309 | + $ref: '#/components/schemas/MemoryBankDocument' | |
| 2310 | + type: array | |
| 2793 | 2311 | required: |
| 2794 | - - request | |
| 2312 | + - bank_id | |
| 2313 | + - documents | |
| 2795 | 2314 | type: object |
| 2796 | 2315 | UserMessage: |
| 2797 | 2316 | additionalProperties: false |
| @@ -2838,7 +2357,7 @@ | ||
| 2838 | 2357 | description: "This is the specification of the llama stack that provides\n \ |
| 2839 | 2358 | \ a set of endpoints and their corresponding interfaces that are tailored\ |
| 2840 | 2359 | \ to\n best leverage Llama Models. The specification is still in\ |
| 2841 | - \ draft and subject to change.\n Generated at 2024-09-10 16:42:15.870336" | |
| 2360 | + \ draft and subject to change.\n Generated at 2024-09-11 16:05:23.016090" | |
| 2842 | 2361 | title: '[DRAFT] Llama Stack Specification' |
| 2843 | 2362 | version: 0.0.1 |
| 2844 | 2363 | jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema |
| @@ -2970,7 +2489,7 @@ | ||
| 2970 | 2489 | content: |
| 2971 | 2490 | application/json: |
| 2972 | 2491 | schema: |
| 2973 | - $ref: '#/components/schemas/AgenticSystemTurnCreateRequestWrapper' | |
| 2492 | + $ref: '#/components/schemas/CreateAgenticSystemTurnRequest' | |
| 2974 | 2493 | required: true |
| 2975 | 2494 | responses: |
| 2976 | 2495 | '200': |
| @@ -2990,24 +2509,7 @@ | ||
| 2990 | 2509 | schema: |
| 2991 | 2510 | type: string |
| 2992 | 2511 | - in: query |
| 2993 | - name: turn_id | |
| 2994 | - required: true | |
| 2995 | - schema: | |
| 2996 | - type: string | |
| 2997 | - responses: | |
| 2998 | - '200': | |
| 2999 | - content: | |
| 3000 | - application/json: | |
| 3001 | - schema: | |
| 3002 | - $ref: '#/components/schemas/Turn' | |
| 3003 | - description: OK | |
| 3004 | - tags: | |
| 3005 | - - AgenticSystem | |
| 3006 | - /artifacts/get: | |
| 3007 | - get: | |
| 3008 | - parameters: | |
| 3009 | - - in: query | |
| 3010 | - name: artifact_id | |
| 2512 | + name: turn_id | |
| 3011 | 2513 | required: true |
| 3012 | 2514 | schema: |
| 3013 | 2515 | type: string |
| @@ -3016,10 +2518,10 @@ | ||
| 3016 | 2518 | content: |
| 3017 | 2519 | application/json: |
| 3018 | 2520 | schema: |
| 3019 | - $ref: '#/components/schemas/Artifact' | |
| 2521 | + $ref: '#/components/schemas/Turn' | |
| 3020 | 2522 | description: OK |
| 3021 | 2523 | tags: |
| 3022 | - - Telemetry | |
| 2524 | + - AgenticSystem | |
| 3023 | 2525 | /batch_inference/chat_completion: |
| 3024 | 2526 | post: |
| 3025 | 2527 | parameters: [] |
| @@ -3027,7 +2529,7 @@ | ||
| 3027 | 2529 | content: |
| 3028 | 2530 | application/json: |
| 3029 | 2531 | schema: |
| 3030 | - $ref: '#/components/schemas/BatchChatCompletionRequestWrapper' | |
| 2532 | + $ref: '#/components/schemas/BatchChatCompletionRequest' | |
| 3031 | 2533 | required: true |
| 3032 | 2534 | responses: |
| 3033 | 2535 | '200': |
| @@ -3045,7 +2547,7 @@ | ||
| 3045 | 2547 | content: |
| 3046 | 2548 | application/json: |
| 3047 | 2549 | schema: |
| 3048 | - $ref: '#/components/schemas/BatchCompletionRequestWrapper' | |
| 2550 | + $ref: '#/components/schemas/BatchCompletionRequest' | |
| 3049 | 2551 | required: true |
| 3050 | 2552 | responses: |
| 3051 | 2553 | '200': |
| @@ -3063,7 +2565,7 @@ | ||
| 3063 | 2565 | content: |
| 3064 | 2566 | application/json: |
| 3065 | 2567 | schema: |
| 3066 | - $ref: '#/components/schemas/CreateDatasetRequestWrapper' | |
| 2568 | + $ref: '#/components/schemas/CreateDatasetRequest' | |
| 3067 | 2569 | required: true |
| 3068 | 2570 | responses: |
| 3069 | 2571 | '200': |
| @@ -3185,7 +2687,7 @@ | ||
| 3185 | 2687 | content: |
| 3186 | 2688 | application/json: |
| 3187 | 2689 | schema: |
| 3188 | - $ref: '#/components/schemas/EvaluateQuestionAnsweringRequestWrapper' | |
| 2690 | + $ref: '#/components/schemas/EvaluateQuestionAnsweringRequest' | |
| 3189 | 2691 | required: true |
| 3190 | 2692 | responses: |
| 3191 | 2693 | '200': |
| @@ -3203,7 +2705,7 @@ | ||
| 3203 | 2705 | content: |
| 3204 | 2706 | application/json: |
| 3205 | 2707 | schema: |
| 3206 | - $ref: '#/components/schemas/EvaluateSummarizationRequestWrapper' | |
| 2708 | + $ref: '#/components/schemas/EvaluateSummarizationRequest' | |
| 3207 | 2709 | required: true |
| 3208 | 2710 | responses: |
| 3209 | 2711 | '200': |
| @@ -3221,7 +2723,7 @@ | ||
| 3221 | 2723 | content: |
| 3222 | 2724 | application/json: |
| 3223 | 2725 | schema: |
| 3224 | - $ref: '#/components/schemas/EvaluateTextGenerationRequestWrapper' | |
| 2726 | + $ref: '#/components/schemas/EvaluateTextGenerationRequest' | |
| 3225 | 2727 | required: true |
| 3226 | 2728 | responses: |
| 3227 | 2729 | '200': |
| @@ -3232,125 +2734,6 @@ | ||
| 3232 | 2734 | description: OK |
| 3233 | 2735 | tags: |
| 3234 | 2736 | - Evaluations |
| 3235 | - /experiments/artifacts/get: | |
| 3236 | - post: | |
| 3237 | - parameters: [] | |
| 3238 | - requestBody: | |
| 3239 | - content: | |
| 3240 | - application/json: | |
| 3241 | - schema: | |
| 3242 | - $ref: '#/components/schemas/ListArtifactsRequest' | |
| 3243 | - required: true | |
| 3244 | - responses: | |
| 3245 | - '200': | |
| 3246 | - content: | |
| 3247 | - application/jsonl: | |
| 3248 | - schema: | |
| 3249 | - $ref: '#/components/schemas/Artifact' | |
| 3250 | - description: OK | |
| 3251 | - tags: | |
| 3252 | - - Telemetry | |
| 3253 | - /experiments/artifacts/upload: | |
| 3254 | - post: | |
| 3255 | - parameters: [] | |
| 3256 | - requestBody: | |
| 3257 | - content: | |
| 3258 | - application/json: | |
| 3259 | - schema: | |
| 3260 | - $ref: '#/components/schemas/UploadArtifactRequestWrapper' | |
| 3261 | - required: true | |
| 3262 | - responses: | |
| 3263 | - '200': | |
| 3264 | - content: | |
| 3265 | - application/json: | |
| 3266 | - schema: | |
| 3267 | - $ref: '#/components/schemas/Artifact' | |
| 3268 | - description: OK | |
| 3269 | - tags: | |
| 3270 | - - Telemetry | |
| 3271 | - /experiments/create: | |
| 3272 | - post: | |
| 3273 | - parameters: [] | |
| 3274 | - requestBody: | |
| 3275 | - content: | |
| 3276 | - application/json: | |
| 3277 | - schema: | |
| 3278 | - $ref: '#/components/schemas/CreateExperimentRequestWrapper' | |
| 3279 | - required: true | |
| 3280 | - responses: | |
| 3281 | - '200': | |
| 3282 | - content: | |
| 3283 | - application/json: | |
| 3284 | - schema: | |
| 3285 | - $ref: '#/components/schemas/Experiment' | |
| 3286 | - description: OK | |
| 3287 | - tags: | |
| 3288 | - - Telemetry | |
| 3289 | - /experiments/create_run: | |
| 3290 | - post: | |
| 3291 | - parameters: [] | |
| 3292 | - requestBody: | |
| 3293 | - content: | |
| 3294 | - application/json: | |
| 3295 | - schema: | |
| 3296 | - $ref: '#/components/schemas/CreateRunRequestWrapper' | |
| 3297 | - required: true | |
| 3298 | - responses: | |
| 3299 | - '200': | |
| 3300 | - content: | |
| 3301 | - application/json: | |
| 3302 | - schema: | |
| 3303 | - $ref: '#/components/schemas/Run' | |
| 3304 | - description: OK | |
| 3305 | - tags: | |
| 3306 | - - Telemetry | |
| 3307 | - /experiments/get: | |
| 3308 | - get: | |
| 3309 | - parameters: | |
| 3310 | - - in: query | |
| 3311 | - name: experiment_id | |
| 3312 | - required: true | |
| 3313 | - schema: | |
| 3314 | - type: string | |
| 3315 | - responses: | |
| 3316 | - '200': | |
| 3317 | - content: | |
| 3318 | - application/json: | |
| 3319 | - schema: | |
| 3320 | - $ref: '#/components/schemas/Experiment' | |
| 3321 | - description: OK | |
| 3322 | - tags: | |
| 3323 | - - Telemetry | |
| 3324 | - /experiments/list: | |
| 3325 | - get: | |
| 3326 | - parameters: [] | |
| 3327 | - responses: | |
| 3328 | - '200': | |
| 3329 | - content: | |
| 3330 | - application/jsonl: | |
| 3331 | - schema: | |
| 3332 | - $ref: '#/components/schemas/Experiment' | |
| 3333 | - description: OK | |
| 3334 | - tags: | |
| 3335 | - - Telemetry | |
| 3336 | - /experiments/update: | |
| 3337 | - post: | |
| 3338 | - parameters: [] | |
| 3339 | - requestBody: | |
| 3340 | - content: | |
| 3341 | - application/json: | |
| 3342 | - schema: | |
| 3343 | - $ref: '#/components/schemas/UpdateExperimentRequestWrapper' | |
| 3344 | - required: true | |
| 3345 | - responses: | |
| 3346 | - '200': | |
| 3347 | - content: | |
| 3348 | - application/json: | |
| 3349 | - schema: | |
| 3350 | - $ref: '#/components/schemas/Experiment' | |
| 3351 | - description: OK | |
| 3352 | - tags: | |
| 3353 | - - Telemetry | |
| 3354 | 2737 | /inference/chat_completion: |
| 3355 | 2738 | post: |
| 3356 | 2739 | parameters: [] |
| @@ -3358,15 +2741,17 @@ | ||
| 3358 | 2741 | content: |
| 3359 | 2742 | application/json: |
| 3360 | 2743 | schema: |
| 3361 | - $ref: '#/components/schemas/ChatCompletionRequestWrapper' | |
| 2744 | + $ref: '#/components/schemas/ChatCompletionRequest' | |
| 3362 | 2745 | required: true |
| 3363 | 2746 | responses: |
| 3364 | 2747 | '200': |
| 3365 | 2748 | content: |
| 3366 | 2749 | text/event-stream: |
| 3367 | 2750 | schema: |
| 3368 | - $ref: '#/components/schemas/ChatCompletionResponseStreamChunk' | |
| 3369 | - description: SSE-stream of these events. | |
| 2751 | + oneOf: | |
| 2752 | + - $ref: '#/components/schemas/ChatCompletionResponse' | |
| 2753 | + - $ref: '#/components/schemas/ChatCompletionResponseStreamChunk' | |
| 2754 | + description: Chat completion response. **OR** SSE-stream of these events. | |
| 3370 | 2755 | tags: |
| 3371 | 2756 | - Inference |
| 3372 | 2757 | /inference/completion: |
| @@ -3376,15 +2761,17 @@ | ||
| 3376 | 2761 | content: |
| 3377 | 2762 | application/json: |
| 3378 | 2763 | schema: |
| 3379 | - $ref: '#/components/schemas/CompletionRequestWrapper' | |
| 2764 | + $ref: '#/components/schemas/CompletionRequest' | |
| 3380 | 2765 | required: true |
| 3381 | 2766 | responses: |
| 3382 | 2767 | '200': |
| 3383 | 2768 | content: |
| 3384 | 2769 | application/json: |
| 3385 | 2770 | schema: |
| 3386 | - $ref: '#/components/schemas/CompletionResponseStreamChunk' | |
| 3387 | - description: streamed completion response. | |
| 2771 | + oneOf: | |
| 2772 | + - $ref: '#/components/schemas/CompletionResponse' | |
| 2773 | + - $ref: '#/components/schemas/CompletionResponseStreamChunk' | |
| 2774 | + description: Completion response. **OR** streamed completion response. | |
| 3388 | 2775 | tags: |
| 3389 | 2776 | - Inference |
| 3390 | 2777 | /inference/embeddings: |
| @@ -3405,38 +2792,6 @@ | ||
| 3405 | 2792 | description: OK |
| 3406 | 2793 | tags: |
| 3407 | 2794 | - Inference |
| 3408 | - /logging/get_logs: | |
| 3409 | - post: | |
| 3410 | - parameters: [] | |
| 3411 | - requestBody: | |
| 3412 | - content: | |
| 3413 | - application/json: | |
| 3414 | - schema: | |
| 3415 | - $ref: '#/components/schemas/LogSearchRequestWrapper' | |
| 3416 | - required: true | |
| 3417 | - responses: | |
| 3418 | - '200': | |
| 3419 | - content: | |
| 3420 | - application/jsonl: | |
| 3421 | - schema: | |
| 3422 | - $ref: '#/components/schemas/Log' | |
| 3423 | - description: OK | |
| 3424 | - tags: | |
| 3425 | - - Telemetry | |
| 3426 | - /logging/log_messages: | |
| 3427 | - post: | |
| 3428 | - parameters: [] | |
| 3429 | - requestBody: | |
| 3430 | - content: | |
| 3431 | - application/json: | |
| 3432 | - schema: | |
| 3433 | - $ref: '#/components/schemas/LogMessagesRequestWrapper' | |
| 3434 | - required: true | |
| 3435 | - responses: | |
| 3436 | - '200': | |
| 3437 | - description: OK | |
| 3438 | - tags: | |
| 3439 | - - Telemetry | |
| 3440 | 2795 | /memory_bank/documents/delete: |
| 3441 | 2796 | post: |
| 3442 | 2797 | parameters: [] |
| @@ -3671,7 +3026,7 @@ | ||
| 3671 | 3026 | content: |
| 3672 | 3027 | application/json: |
| 3673 | 3028 | schema: |
| 3674 | - $ref: '#/components/schemas/PostTrainingRLHFRequestWrapper' | |
| 3029 | + $ref: '#/components/schemas/PreferenceOptimizeRequest' | |
| 3675 | 3030 | required: true |
| 3676 | 3031 | responses: |
| 3677 | 3032 | '200': |
| @@ -3689,7 +3044,7 @@ | ||
| 3689 | 3044 | content: |
| 3690 | 3045 | application/json: |
| 3691 | 3046 | schema: |
| 3692 | - $ref: '#/components/schemas/PostTrainingSFTRequestWrapper' | |
| 3047 | + $ref: '#/components/schemas/SupervisedFineTuneRequest' | |
| 3693 | 3048 | required: true |
| 3694 | 3049 | responses: |
| 3695 | 3050 | '200': |
| @@ -3707,7 +3062,7 @@ | ||
| 3707 | 3062 | content: |
| 3708 | 3063 | application/json: |
| 3709 | 3064 | schema: |
| 3710 | - $ref: '#/components/schemas/RewardScoringRequestWrapper' | |
| 3065 | + $ref: '#/components/schemas/RewardScoreRequest' | |
| 3711 | 3066 | required: true |
| 3712 | 3067 | responses: |
| 3713 | 3068 | '200': |
| @@ -3718,110 +3073,89 @@ | ||
| 3718 | 3073 | description: OK |
| 3719 | 3074 | tags: |
| 3720 | 3075 | - RewardScoring |
| 3721 | - /runs/log_metrics: | |
| 3076 | + /safety/run_shields: | |
| 3722 | 3077 | post: |
| 3723 | 3078 | parameters: [] |
| 3724 | 3079 | requestBody: |
| 3725 | 3080 | content: |
| 3726 | 3081 | application/json: |
| 3727 | 3082 | schema: |
| 3728 | - $ref: '#/components/schemas/LogMetricsRequestWrapper' | |
| 3729 | - required: true | |
| 3730 | - responses: | |
| 3731 | - '200': | |
| 3732 | - description: OK | |
| 3733 | - tags: | |
| 3734 | - - Telemetry | |
| 3735 | - /runs/metrics: | |
| 3736 | - get: | |
| 3737 | - parameters: | |
| 3738 | - - in: query | |
| 3739 | - name: run_id | |
| 3083 | + $ref: '#/components/schemas/RunShieldsRequest' | |
| 3740 | 3084 | required: true |
| 3741 | - schema: | |
| 3742 | - type: string | |
| 3743 | 3085 | responses: |
| 3744 | 3086 | '200': |
| 3745 | 3087 | content: |
| 3746 | - application/jsonl: | |
| 3088 | + application/json: | |
| 3747 | 3089 | schema: |
| 3748 | - $ref: '#/components/schemas/Metric' | |
| 3090 | + $ref: '#/components/schemas/RunShieldResponse' | |
| 3749 | 3091 | description: OK |
| 3750 | 3092 | tags: |
| 3751 | - - Telemetry | |
| 3752 | - /runs/update: | |
| 3093 | + - Safety | |
| 3094 | + /synthetic_data_generation/generate: | |
| 3753 | 3095 | post: |
| 3754 | 3096 | parameters: [] |
| 3755 | 3097 | requestBody: |
| 3756 | 3098 | content: |
| 3757 | 3099 | application/json: |
| 3758 | 3100 | schema: |
| 3759 | - $ref: '#/components/schemas/UpdateRunRequestWrapper' | |
| 3101 | + $ref: '#/components/schemas/SyntheticDataGenerateRequest' | |
| 3760 | 3102 | required: true |
| 3761 | 3103 | responses: |
| 3762 | 3104 | '200': |
| 3763 | 3105 | content: |
| 3764 | 3106 | application/json: |
| 3765 | 3107 | schema: |
| 3766 | - $ref: '#/components/schemas/Run' | |
| 3108 | + $ref: '#/components/schemas/SyntheticDataGenerationResponse' | |
| 3767 | 3109 | description: OK |
| 3768 | 3110 | tags: |
| 3769 | - - Telemetry | |
| 3770 | - /safety/run_shields: | |
| 3771 | - post: | |
| 3772 | - parameters: [] | |
| 3773 | - requestBody: | |
| 3774 | - content: | |
| 3775 | - application/json: | |
| 3776 | - schema: | |
| 3777 | - $ref: '#/components/schemas/RunShieldRequestWrapper' | |
| 3111 | + - SyntheticDataGeneration | |
| 3112 | + /telemetry/get_trace: | |
| 3113 | + get: | |
| 3114 | + parameters: | |
| 3115 | + - in: query | |
| 3116 | + name: trace_id | |
| 3778 | 3117 | required: true |
| 3118 | + schema: | |
| 3119 | + type: string | |
| 3779 | 3120 | responses: |
| 3780 | 3121 | '200': |
| 3781 | 3122 | content: |
| 3782 | 3123 | application/json: |
| 3783 | 3124 | schema: |
| 3784 | - $ref: '#/components/schemas/RunShieldResponse' | |
| 3125 | + $ref: '#/components/schemas/Trace' | |
| 3785 | 3126 | description: OK |
| 3786 | 3127 | tags: |
| 3787 | - - Safety | |
| 3788 | - /synthetic_data_generation/generate: | |
| 3128 | + - Telemetry | |
| 3129 | + /telemetry/log_event: | |
| 3789 | 3130 | post: |
| 3790 | 3131 | parameters: [] |
| 3791 | 3132 | requestBody: |
| 3792 | 3133 | content: |
| 3793 | 3134 | application/json: |
| 3794 | 3135 | schema: |
| 3795 | - $ref: '#/components/schemas/SyntheticDataGenerationRequestWrapper' | |
| 3136 | + $ref: '#/components/schemas/LogEventRequest' | |
| 3796 | 3137 | required: true |
| 3797 | 3138 | responses: |
| 3798 | 3139 | '200': |
| 3799 | - content: | |
| 3800 | - application/json: | |
| 3801 | - schema: | |
| 3802 | - $ref: '#/components/schemas/SyntheticDataGenerationResponse' | |
| 3803 | 3140 | description: OK |
| 3804 | 3141 | tags: |
| 3805 | - - SyntheticDataGeneration | |
| 3142 | + - Telemetry | |
| 3806 | 3143 | security: |
| 3807 | 3144 | - Default: [] |
| 3808 | 3145 | servers: |
| 3809 | 3146 | - url: http://any-hosted-llama-stack.com |
| 3810 | 3147 | tags: |
| 3811 | -- name: BatchInference | |
| 3812 | -- name: Safety | |
| 3813 | -- name: Telemetry | |
| 3814 | -- name: RewardScoring | |
| 3815 | -- name: Memory | |
| 3816 | 3148 | - name: SyntheticDataGeneration |
| 3817 | -- name: Inference | |
| 3149 | +- name: Datasets | |
| 3818 | 3150 | - name: Evaluations |
| 3151 | +- name: Safety | |
| 3152 | +- name: Inference | |
| 3153 | +- name: Telemetry | |
| 3819 | 3154 | - name: PostTraining |
| 3820 | -- name: Datasets | |
| 3155 | +- name: Memory | |
| 3156 | +- name: RewardScoring | |
| 3157 | +- name: BatchInference | |
| 3821 | 3158 | - name: AgenticSystem |
| 3822 | -- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest" | |
| 3823 | - /> | |
| 3824 | - name: BatchChatCompletionRequest | |
| 3825 | 3159 | - description: <SchemaDefinition schemaRef="#/components/schemas/BuiltinTool" /> |
| 3826 | 3160 | name: BuiltinTool |
| 3827 | 3161 | - description: <SchemaDefinition schemaRef="#/components/schemas/CompletionMessage" |
| @@ -3861,18 +3195,15 @@ | ||
| 3861 | 3195 | name: ToolResponseMessage |
| 3862 | 3196 | - description: <SchemaDefinition schemaRef="#/components/schemas/UserMessage" /> |
| 3863 | 3197 | name: UserMessage |
| 3864 | -- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequestWrapper" | |
| 3198 | +- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest" | |
| 3865 | 3199 | /> |
| 3866 | - name: BatchChatCompletionRequestWrapper | |
| 3200 | + name: BatchChatCompletionRequest | |
| 3867 | 3201 | - description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionResponse" |
| 3868 | 3202 | /> |
| 3869 | 3203 | name: BatchChatCompletionResponse |
| 3870 | 3204 | - description: <SchemaDefinition schemaRef="#/components/schemas/BatchCompletionRequest" |
| 3871 | 3205 | /> |
| 3872 | 3206 | name: BatchCompletionRequest |
| 3873 | -- description: <SchemaDefinition schemaRef="#/components/schemas/BatchCompletionRequestWrapper" | |
| 3874 | - /> | |
| 3875 | - name: BatchCompletionRequestWrapper | |
| 3876 | 3207 | - description: <SchemaDefinition schemaRef="#/components/schemas/BatchCompletionResponse" |
| 3877 | 3208 | /> |
| 3878 | 3209 | name: BatchCompletionResponse |
| @@ -3885,9 +3216,11 @@ | ||
| 3885 | 3216 | - description: <SchemaDefinition schemaRef="#/components/schemas/ChatCompletionRequest" |
| 3886 | 3217 | /> |
| 3887 | 3218 | name: ChatCompletionRequest |
| 3888 | -- description: <SchemaDefinition schemaRef="#/components/schemas/ChatCompletionRequestWrapper" | |
| 3889 | - /> | |
| 3890 | - name: ChatCompletionRequestWrapper | |
| 3219 | +- description: 'Chat completion response. | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + <SchemaDefinition schemaRef="#/components/schemas/ChatCompletionResponse" />' | |
| 3223 | + name: ChatCompletionResponse | |
| 3891 | 3224 | - description: 'Chat completion response event. |
| 3892 | 3225 | |
| 3893 | 3226 | |
| @@ -3913,9 +3246,11 @@ | ||
| 3913 | 3246 | - description: <SchemaDefinition schemaRef="#/components/schemas/CompletionRequest" |
| 3914 | 3247 | /> |
| 3915 | 3248 | name: CompletionRequest |
| 3916 | -- description: <SchemaDefinition schemaRef="#/components/schemas/CompletionRequestWrapper" | |
| 3917 | - /> | |
| 3918 | - name: CompletionRequestWrapper | |
| 3249 | +- description: 'Completion response. | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + <SchemaDefinition schemaRef="#/components/schemas/CompletionResponse" />' | |
| 3253 | + name: CompletionResponse | |
| 3919 | 3254 | - description: 'streamed completion response. |
| 3920 | 3255 | |
| 3921 | 3256 | |
| @@ -3966,14 +3301,11 @@ | ||
| 3966 | 3301 | - description: <SchemaDefinition schemaRef="#/components/schemas/AgenticSystemSessionCreateResponse" |
| 3967 | 3302 | /> |
| 3968 | 3303 | name: AgenticSystemSessionCreateResponse |
| 3969 | -- description: <SchemaDefinition schemaRef="#/components/schemas/AgenticSystemTurnCreateRequest" | |
| 3970 | - /> | |
| 3971 | - name: AgenticSystemTurnCreateRequest | |
| 3972 | 3304 | - description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" /> |
| 3973 | 3305 | name: Attachment |
| 3974 | -- description: <SchemaDefinition schemaRef="#/components/schemas/AgenticSystemTurnCreateRequestWrapper" | |
| 3306 | +- description: <SchemaDefinition schemaRef="#/components/schemas/CreateAgenticSystemTurnRequest" | |
| 3975 | 3307 | /> |
| 3976 | - name: AgenticSystemTurnCreateRequestWrapper | |
| 3308 | + name: CreateAgenticSystemTurnRequest | |
| 3977 | 3309 | - description: 'Streamed agent execution response. |
| 3978 | 3310 | |
| 3979 | 3311 | |
| @@ -4017,11 +3349,6 @@ | ||
| 4017 | 3349 | |
| 4018 | 3350 | <SchemaDefinition schemaRef="#/components/schemas/Turn" />' |
| 4019 | 3351 | name: Turn |
| 4020 | -- description: 'Request to create a dataset. | |
| 4021 | - | |
| 4022 | - | |
| 4023 | - <SchemaDefinition schemaRef="#/components/schemas/CreateDatasetRequest" />' | |
| 4024 | - name: CreateDatasetRequest | |
| 4025 | 3352 | - description: 'Dataset to be used for training or evaluating language models. |
| 4026 | 3353 | |
| 4027 | 3354 | |
| @@ -4030,33 +3357,14 @@ | ||
| 4030 | 3357 | - description: <SchemaDefinition schemaRef="#/components/schemas/TrainEvalDatasetColumnType" |
| 4031 | 3358 | /> |
| 4032 | 3359 | name: TrainEvalDatasetColumnType |
| 4033 | -- description: <SchemaDefinition schemaRef="#/components/schemas/CreateDatasetRequestWrapper" | |
| 4034 | - /> | |
| 4035 | - name: CreateDatasetRequestWrapper | |
| 4036 | -- description: <SchemaDefinition schemaRef="#/components/schemas/CreateExperimentRequest" | |
| 4037 | - /> | |
| 4038 | - name: CreateExperimentRequest | |
| 4039 | -- description: <SchemaDefinition schemaRef="#/components/schemas/CreateExperimentRequestWrapper" | |
| 4040 | - /> | |
| 4041 | - name: CreateExperimentRequestWrapper | |
| 4042 | -- description: <SchemaDefinition schemaRef="#/components/schemas/Experiment" /> | |
| 4043 | - name: Experiment | |
| 4044 | -- description: <SchemaDefinition schemaRef="#/components/schemas/ExperimentStatus" | |
| 3360 | +- description: <SchemaDefinition schemaRef="#/components/schemas/CreateDatasetRequest" | |
| 4045 | 3361 | /> |
| 4046 | - name: ExperimentStatus | |
| 3362 | + name: CreateDatasetRequest | |
| 4047 | 3363 | - description: <SchemaDefinition schemaRef="#/components/schemas/CreateMemoryBankRequest" |
| 4048 | 3364 | /> |
| 4049 | 3365 | name: CreateMemoryBankRequest |
| 4050 | 3366 | - description: <SchemaDefinition schemaRef="#/components/schemas/MemoryBank" /> |
| 4051 | 3367 | name: MemoryBank |
| 4052 | -- description: <SchemaDefinition schemaRef="#/components/schemas/CreateRunRequest" | |
| 4053 | - /> | |
| 4054 | - name: CreateRunRequest | |
| 4055 | -- description: <SchemaDefinition schemaRef="#/components/schemas/CreateRunRequestWrapper" | |
| 4056 | - /> | |
| 4057 | - name: CreateRunRequestWrapper | |
| 4058 | -- description: <SchemaDefinition schemaRef="#/components/schemas/Run" /> | |
| 4059 | - name: Run | |
| 4060 | 3368 | - description: <SchemaDefinition schemaRef="#/components/schemas/DeleteAgenticSystemRequest" |
| 4061 | 3369 | /> |
| 4062 | 3370 | name: DeleteAgenticSystemRequest |
| @@ -4078,40 +3386,17 @@ | ||
| 4078 | 3386 | - description: <SchemaDefinition schemaRef="#/components/schemas/EmbeddingsResponse" |
| 4079 | 3387 | /> |
| 4080 | 3388 | name: EmbeddingsResponse |
| 4081 | -- description: 'Checkpoint created during training runs | |
| 4082 | - | |
| 4083 | - | |
| 4084 | - <SchemaDefinition schemaRef="#/components/schemas/Checkpoint" />' | |
| 4085 | - name: Checkpoint | |
| 4086 | -- description: 'Request to evaluate question answering. | |
| 4087 | - | |
| 4088 | - | |
| 4089 | - <SchemaDefinition schemaRef="#/components/schemas/EvaluateQuestionAnsweringRequest" | |
| 4090 | - />' | |
| 4091 | - name: EvaluateQuestionAnsweringRequest | |
| 4092 | -- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateQuestionAnsweringRequestWrapper" | |
| 3389 | +- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateQuestionAnsweringRequest" | |
| 4093 | 3390 | /> |
| 4094 | - name: EvaluateQuestionAnsweringRequestWrapper | |
| 3391 | + name: EvaluateQuestionAnsweringRequest | |
| 4095 | 3392 | - description: <SchemaDefinition schemaRef="#/components/schemas/EvaluationJob" /> |
| 4096 | 3393 | name: EvaluationJob |
| 4097 | -- description: 'Request to evaluate summarization. | |
| 4098 | - | |
| 4099 | - | |
| 4100 | - <SchemaDefinition schemaRef="#/components/schemas/EvaluateSummarizationRequest" | |
| 4101 | - />' | |
| 3394 | +- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateSummarizationRequest" | |
| 3395 | + /> | |
| 4102 | 3396 | name: EvaluateSummarizationRequest |
| 4103 | -- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateSummarizationRequestWrapper" | |
| 3397 | +- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateTextGenerationRequest" | |
| 4104 | 3398 | /> |
| 4105 | - name: EvaluateSummarizationRequestWrapper | |
| 4106 | -- description: 'Request to evaluate text generation. | |
| 4107 | - | |
| 4108 | - | |
| 4109 | - <SchemaDefinition schemaRef="#/components/schemas/EvaluateTextGenerationRequest" | |
| 4110 | - />' | |
| 4111 | 3399 | name: EvaluateTextGenerationRequest |
| 4112 | -- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateTextGenerationRequestWrapper" | |
| 4113 | - /> | |
| 4114 | - name: EvaluateTextGenerationRequestWrapper | |
| 4115 | 3400 | - description: <SchemaDefinition schemaRef="#/components/schemas/GetAgenticSystemSessionRequest" |
| 4116 | 3401 | /> |
| 4117 | 3402 | name: GetAgenticSystemSessionRequest |
| @@ -4123,10 +3408,6 @@ | ||
| 4123 | 3408 | - description: <SchemaDefinition schemaRef="#/components/schemas/AgenticSystemStepResponse" |
| 4124 | 3409 | /> |
| 4125 | 3410 | name: AgenticSystemStepResponse |
| 4126 | -- description: <SchemaDefinition schemaRef="#/components/schemas/Artifact" /> | |
| 4127 | - name: Artifact | |
| 4128 | -- description: <SchemaDefinition schemaRef="#/components/schemas/ArtifactType" /> | |
| 4129 | - name: ArtifactType | |
| 4130 | 3411 | - description: <SchemaDefinition schemaRef="#/components/schemas/GetDocumentsRequest" |
| 4131 | 3412 | /> |
| 4132 | 3413 | name: GetDocumentsRequest |
| @@ -4145,16 +3426,13 @@ | ||
| 4145 | 3426 | - description: <SchemaDefinition schemaRef="#/components/schemas/EvaluationJobStatusResponse" |
| 4146 | 3427 | /> |
| 4147 | 3428 | name: EvaluationJobStatusResponse |
| 4148 | -- description: <SchemaDefinition schemaRef="#/components/schemas/LogSearchRequest" | |
| 4149 | - /> | |
| 4150 | - name: LogSearchRequest | |
| 4151 | -- description: <SchemaDefinition schemaRef="#/components/schemas/LogSearchRequestWrapper" | |
| 4152 | - /> | |
| 4153 | - name: LogSearchRequestWrapper | |
| 4154 | -- description: <SchemaDefinition schemaRef="#/components/schemas/Log" /> | |
| 4155 | - name: Log | |
| 4156 | -- description: <SchemaDefinition schemaRef="#/components/schemas/Metric" /> | |
| 4157 | - name: Metric | |
| 3429 | +- description: <SchemaDefinition schemaRef="#/components/schemas/Trace" /> | |
| 3430 | + name: Trace | |
| 3431 | +- description: 'Checkpoint created during training runs | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + <SchemaDefinition schemaRef="#/components/schemas/Checkpoint" />' | |
| 3435 | + name: Checkpoint | |
| 4158 | 3436 | - description: 'Artifacts of a finetuning job. |
| 4159 | 3437 | |
| 4160 | 3438 | |
| @@ -4181,39 +3459,39 @@ | ||
| 4181 | 3459 | - description: <SchemaDefinition schemaRef="#/components/schemas/InsertDocumentsRequest" |
| 4182 | 3460 | /> |
| 4183 | 3461 | name: InsertDocumentsRequest |
| 4184 | -- description: <SchemaDefinition schemaRef="#/components/schemas/ListArtifactsRequest" | |
| 4185 | - /> | |
| 4186 | - name: ListArtifactsRequest | |
| 4187 | -- description: <SchemaDefinition schemaRef="#/components/schemas/LogMessagesRequest" | |
| 4188 | - /> | |
| 4189 | - name: LogMessagesRequest | |
| 4190 | -- description: <SchemaDefinition schemaRef="#/components/schemas/LogMessagesRequestWrapper" | |
| 4191 | - /> | |
| 4192 | - name: LogMessagesRequestWrapper | |
| 4193 | -- description: <SchemaDefinition schemaRef="#/components/schemas/LogMetricsRequest" | |
| 4194 | - /> | |
| 4195 | - name: LogMetricsRequest | |
| 4196 | -- description: <SchemaDefinition schemaRef="#/components/schemas/LogMetricsRequestWrapper" | |
| 4197 | - /> | |
| 4198 | - name: LogMetricsRequestWrapper | |
| 3462 | +- description: <SchemaDefinition schemaRef="#/components/schemas/LogSeverity" /> | |
| 3463 | + name: LogSeverity | |
| 3464 | +- description: <SchemaDefinition schemaRef="#/components/schemas/MetricEvent" /> | |
| 3465 | + name: MetricEvent | |
| 3466 | +- description: <SchemaDefinition schemaRef="#/components/schemas/SpanEndPayload" /> | |
| 3467 | + name: SpanEndPayload | |
| 3468 | +- description: <SchemaDefinition schemaRef="#/components/schemas/SpanStartPayload" | |
| 3469 | + /> | |
| 3470 | + name: SpanStartPayload | |
| 3471 | +- description: <SchemaDefinition schemaRef="#/components/schemas/SpanStatus" /> | |
| 3472 | + name: SpanStatus | |
| 3473 | +- description: <SchemaDefinition schemaRef="#/components/schemas/StructuredLogEvent" | |
| 3474 | + /> | |
| 3475 | + name: StructuredLogEvent | |
| 3476 | +- description: <SchemaDefinition schemaRef="#/components/schemas/UnstructuredLogEvent" | |
| 3477 | + /> | |
| 3478 | + name: UnstructuredLogEvent | |
| 3479 | +- description: <SchemaDefinition schemaRef="#/components/schemas/LogEventRequest" | |
| 3480 | + /> | |
| 3481 | + name: LogEventRequest | |
| 4199 | 3482 | - description: <SchemaDefinition schemaRef="#/components/schemas/DPOAlignmentConfig" |
| 4200 | 3483 | /> |
| 4201 | 3484 | name: DPOAlignmentConfig |
| 4202 | 3485 | - description: <SchemaDefinition schemaRef="#/components/schemas/OptimizerConfig" |
| 4203 | 3486 | /> |
| 4204 | 3487 | name: OptimizerConfig |
| 4205 | -- description: 'Request to finetune a model. | |
| 4206 | - | |
| 4207 | - | |
| 4208 | - <SchemaDefinition schemaRef="#/components/schemas/PostTrainingRLHFRequest" />' | |
| 4209 | - name: PostTrainingRLHFRequest | |
| 4210 | 3488 | - description: <SchemaDefinition schemaRef="#/components/schemas/RLHFAlgorithm" /> |
| 4211 | 3489 | name: RLHFAlgorithm |
| 4212 | 3490 | - description: <SchemaDefinition schemaRef="#/components/schemas/TrainingConfig" /> |
| 4213 | 3491 | name: TrainingConfig |
| 4214 | -- description: <SchemaDefinition schemaRef="#/components/schemas/PostTrainingRLHFRequestWrapper" | |
| 3492 | +- description: <SchemaDefinition schemaRef="#/components/schemas/PreferenceOptimizeRequest" | |
| 4215 | 3493 | /> |
| 4216 | - name: PostTrainingRLHFRequestWrapper | |
| 3494 | + name: PreferenceOptimizeRequest | |
| 4217 | 3495 | - description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsRequest" |
| 4218 | 3496 | /> |
| 4219 | 3497 | name: QueryDocumentsRequest |
| @@ -4223,15 +3501,9 @@ | ||
| 4223 | 3501 | - description: <SchemaDefinition schemaRef="#/components/schemas/DialogGenerations" |
| 4224 | 3502 | /> |
| 4225 | 3503 | name: DialogGenerations |
| 4226 | -- description: 'Request to score a reward function. A list of prompts and a list of | |
| 4227 | - responses per prompt. | |
| 4228 | - | |
| 4229 | - | |
| 4230 | - <SchemaDefinition schemaRef="#/components/schemas/RewardScoringRequest" />' | |
| 4231 | - name: RewardScoringRequest | |
| 4232 | -- description: <SchemaDefinition schemaRef="#/components/schemas/RewardScoringRequestWrapper" | |
| 4233 | - /> | |
| 4234 | - name: RewardScoringRequestWrapper | |
| 3504 | +- description: <SchemaDefinition schemaRef="#/components/schemas/RewardScoreRequest" | |
| 3505 | + /> | |
| 3506 | + name: RewardScoreRequest | |
| 4235 | 3507 | - description: 'Response from the reward scoring. Batch of (prompt, response, score) |
| 4236 | 3508 | tuples that pass the threshold. |
| 4237 | 3509 | |
| @@ -4243,12 +3515,9 @@ | ||
| 4243 | 3515 | name: ScoredDialogGenerations |
| 4244 | 3516 | - description: <SchemaDefinition schemaRef="#/components/schemas/ScoredMessage" /> |
| 4245 | 3517 | name: ScoredMessage |
| 4246 | -- description: <SchemaDefinition schemaRef="#/components/schemas/RunShieldRequest" | |
| 3518 | +- description: <SchemaDefinition schemaRef="#/components/schemas/RunShieldsRequest" | |
| 4247 | 3519 | /> |
| 4248 | - name: RunShieldRequest | |
| 4249 | -- description: <SchemaDefinition schemaRef="#/components/schemas/RunShieldRequestWrapper" | |
| 4250 | - /> | |
| 4251 | - name: RunShieldRequestWrapper | |
| 3520 | + name: RunShieldsRequest | |
| 4252 | 3521 | - description: <SchemaDefinition schemaRef="#/components/schemas/RunShieldResponse" |
| 4253 | 3522 | /> |
| 4254 | 3523 | name: RunShieldResponse |
| @@ -4261,27 +3530,15 @@ | ||
| 4261 | 3530 | - description: <SchemaDefinition schemaRef="#/components/schemas/LoraFinetuningConfig" |
| 4262 | 3531 | /> |
| 4263 | 3532 | name: LoraFinetuningConfig |
| 4264 | -- description: 'Request to finetune a model. | |
| 4265 | - | |
| 4266 | - | |
| 4267 | - <SchemaDefinition schemaRef="#/components/schemas/PostTrainingSFTRequest" />' | |
| 4268 | - name: PostTrainingSFTRequest | |
| 4269 | 3533 | - description: <SchemaDefinition schemaRef="#/components/schemas/QLoraFinetuningConfig" |
| 4270 | 3534 | /> |
| 4271 | 3535 | name: QLoraFinetuningConfig |
| 4272 | -- description: <SchemaDefinition schemaRef="#/components/schemas/PostTrainingSFTRequestWrapper" | |
| 4273 | - /> | |
| 4274 | - name: PostTrainingSFTRequestWrapper | |
| 4275 | -- description: 'Request to generate synthetic data. A small batch of prompts and a | |
| 4276 | - filtering function | |
| 4277 | - | |
| 4278 | - | |
| 4279 | - <SchemaDefinition schemaRef="#/components/schemas/SyntheticDataGenerationRequest" | |
| 4280 | - />' | |
| 4281 | - name: SyntheticDataGenerationRequest | |
| 4282 | -- description: <SchemaDefinition schemaRef="#/components/schemas/SyntheticDataGenerationRequestWrapper" | |
| 3536 | +- description: <SchemaDefinition schemaRef="#/components/schemas/SupervisedFineTuneRequest" | |
| 4283 | 3537 | /> |
| 4284 | - name: SyntheticDataGenerationRequestWrapper | |
| 3538 | + name: SupervisedFineTuneRequest | |
| 3539 | +- description: <SchemaDefinition schemaRef="#/components/schemas/SyntheticDataGenerateRequest" | |
| 3540 | + /> | |
| 3541 | + name: SyntheticDataGenerateRequest | |
| 4285 | 3542 | - description: 'Response from the synthetic data generation. Batch of (prompt, response, |
| 4286 | 3543 | score) tuples that pass the threshold. |
| 4287 | 3544 | |
| @@ -4292,24 +3549,6 @@ | ||
| 4292 | 3549 | - description: <SchemaDefinition schemaRef="#/components/schemas/UpdateDocumentsRequest" |
| 4293 | 3550 | /> |
| 4294 | 3551 | name: UpdateDocumentsRequest |
| 4295 | -- description: <SchemaDefinition schemaRef="#/components/schemas/UpdateExperimentRequest" | |
| 4296 | - /> | |
| 4297 | - name: UpdateExperimentRequest | |
| 4298 | -- description: <SchemaDefinition schemaRef="#/components/schemas/UpdateExperimentRequestWrapper" | |
| 4299 | - /> | |
| 4300 | - name: UpdateExperimentRequestWrapper | |
| 4301 | -- description: <SchemaDefinition schemaRef="#/components/schemas/UpdateRunRequest" | |
| 4302 | - /> | |
| 4303 | - name: UpdateRunRequest | |
| 4304 | -- description: <SchemaDefinition schemaRef="#/components/schemas/UpdateRunRequestWrapper" | |
| 4305 | - /> | |
| 4306 | - name: UpdateRunRequestWrapper | |
| 4307 | -- description: <SchemaDefinition schemaRef="#/components/schemas/UploadArtifactRequest" | |
| 4308 | - /> | |
| 4309 | - name: UploadArtifactRequest | |
| 4310 | -- description: <SchemaDefinition schemaRef="#/components/schemas/UploadArtifactRequestWrapper" | |
| 4311 | - /> | |
| 4312 | - name: UploadArtifactRequestWrapper | |
| 4313 | 3552 | x-tagGroups: |
| 4314 | 3553 | - name: Operations |
| 4315 | 3554 | tags: |
| @@ -4330,8 +3569,6 @@ | ||
| 4330 | 3569 | - AgenticSystemCreateResponse |
| 4331 | 3570 | - AgenticSystemSessionCreateResponse |
| 4332 | 3571 | - AgenticSystemStepResponse |
| 4333 | - - AgenticSystemTurnCreateRequest | |
| 4334 | - - AgenticSystemTurnCreateRequestWrapper | |
| 4335 | 3572 | - AgenticSystemTurnResponseEvent |
| 4336 | 3573 | - AgenticSystemTurnResponseStepCompletePayload |
| 4337 | 3574 | - AgenticSystemTurnResponseStepProgressPayload |
| @@ -4339,21 +3576,17 @@ | ||
| 4339 | 3576 | - AgenticSystemTurnResponseStreamChunk |
| 4340 | 3577 | - AgenticSystemTurnResponseTurnCompletePayload |
| 4341 | 3578 | - AgenticSystemTurnResponseTurnStartPayload |
| 4342 | - - Artifact | |
| 4343 | - - ArtifactType | |
| 4344 | 3579 | - Attachment |
| 4345 | 3580 | - BatchChatCompletionRequest |
| 4346 | - - BatchChatCompletionRequestWrapper | |
| 4347 | 3581 | - BatchChatCompletionResponse |
| 4348 | 3582 | - BatchCompletionRequest |
| 4349 | - - BatchCompletionRequestWrapper | |
| 4350 | 3583 | - BatchCompletionResponse |
| 4351 | 3584 | - BuiltinShield |
| 4352 | 3585 | - BuiltinTool |
| 4353 | 3586 | - CancelEvaluationJobRequest |
| 4354 | 3587 | - CancelTrainingJobRequest |
| 4355 | 3588 | - ChatCompletionRequest |
| 4356 | - - ChatCompletionRequestWrapper | |
| 3589 | + - ChatCompletionResponse | |
| 4357 | 3590 | - ChatCompletionResponseEvent |
| 4358 | 3591 | - ChatCompletionResponseEventType |
| 4359 | 3592 | - ChatCompletionResponseStreamChunk |
| @@ -4361,17 +3594,13 @@ | ||
| 4361 | 3594 | - CodeInterpreterToolDefinition |
| 4362 | 3595 | - CompletionMessage |
| 4363 | 3596 | - CompletionRequest |
| 4364 | - - CompletionRequestWrapper | |
| 3597 | + - CompletionResponse | |
| 4365 | 3598 | - CompletionResponseStreamChunk |
| 4366 | 3599 | - CreateAgenticSystemRequest |
| 4367 | 3600 | - CreateAgenticSystemSessionRequest |
| 3601 | + - CreateAgenticSystemTurnRequest | |
| 4368 | 3602 | - CreateDatasetRequest |
| 4369 | - - CreateDatasetRequestWrapper | |
| 4370 | - - CreateExperimentRequest | |
| 4371 | - - CreateExperimentRequestWrapper | |
| 4372 | 3603 | - CreateMemoryBankRequest |
| 4373 | - - CreateRunRequest | |
| 4374 | - - CreateRunRequestWrapper | |
| 4375 | 3604 | - DPOAlignmentConfig |
| 4376 | 3605 | - DeleteAgenticSystemRequest |
| 4377 | 3606 | - DeleteAgenticSystemSessionRequest |
| @@ -4383,36 +3612,25 @@ | ||
| 4383 | 3612 | - EmbeddingsRequest |
| 4384 | 3613 | - EmbeddingsResponse |
| 4385 | 3614 | - EvaluateQuestionAnsweringRequest |
| 4386 | - - EvaluateQuestionAnsweringRequestWrapper | |
| 4387 | 3615 | - EvaluateSummarizationRequest |
| 4388 | - - EvaluateSummarizationRequestWrapper | |
| 4389 | 3616 | - EvaluateTextGenerationRequest |
| 4390 | - - EvaluateTextGenerationRequestWrapper | |
| 4391 | 3617 | - EvaluationJob |
| 4392 | 3618 | - EvaluationJobArtifactsResponse |
| 4393 | 3619 | - EvaluationJobLogStream |
| 4394 | 3620 | - EvaluationJobStatusResponse |
| 4395 | - - Experiment | |
| 4396 | - - ExperimentStatus | |
| 4397 | 3621 | - FinetuningAlgorithm |
| 4398 | 3622 | - FunctionCallToolDefinition |
| 4399 | 3623 | - GetAgenticSystemSessionRequest |
| 4400 | 3624 | - GetDocumentsRequest |
| 4401 | 3625 | - InferenceStep |
| 4402 | 3626 | - InsertDocumentsRequest |
| 4403 | - - ListArtifactsRequest | |
| 4404 | - - Log | |
| 4405 | - - LogMessagesRequest | |
| 4406 | - - LogMessagesRequestWrapper | |
| 4407 | - - LogMetricsRequest | |
| 4408 | - - LogMetricsRequestWrapper | |
| 4409 | - - LogSearchRequest | |
| 4410 | - - LogSearchRequestWrapper | |
| 3627 | + - LogEventRequest | |
| 3628 | + - LogSeverity | |
| 4411 | 3629 | - LoraFinetuningConfig |
| 4412 | 3630 | - MemoryBank |
| 4413 | 3631 | - MemoryBankDocument |
| 4414 | 3632 | - MemoryRetrievalStep |
| 4415 | - - Metric | |
| 3633 | + - MetricEvent | |
| 4416 | 3634 | - OnViolationAction |
| 4417 | 3635 | - OptimizerConfig |
| 4418 | 3636 | - PhotogenToolDefinition |
| @@ -4421,23 +3639,17 @@ | ||
| 4421 | 3639 | - PostTrainingJobLogStream |
| 4422 | 3640 | - PostTrainingJobStatus |
| 4423 | 3641 | - PostTrainingJobStatusResponse |
| 4424 | - - PostTrainingRLHFRequest | |
| 4425 | - - PostTrainingRLHFRequestWrapper | |
| 4426 | - - PostTrainingSFTRequest | |
| 4427 | - - PostTrainingSFTRequestWrapper | |
| 3642 | + - PreferenceOptimizeRequest | |
| 4428 | 3643 | - QLoraFinetuningConfig |
| 4429 | 3644 | - QueryDocumentsRequest |
| 4430 | 3645 | - QueryDocumentsResponse |
| 4431 | 3646 | - RLHFAlgorithm |
| 4432 | 3647 | - RestAPIExecutionConfig |
| 4433 | 3648 | - RestAPIMethod |
| 4434 | - - RewardScoringRequest | |
| 4435 | - - RewardScoringRequestWrapper | |
| 3649 | + - RewardScoreRequest | |
| 4436 | 3650 | - RewardScoringResponse |
| 4437 | - - Run | |
| 4438 | - - RunShieldRequest | |
| 4439 | - - RunShieldRequestWrapper | |
| 4440 | 3651 | - RunShieldResponse |
| 3652 | + - RunShieldsRequest | |
| 4441 | 3653 | - SamplingParams |
| 4442 | 3654 | - SamplingStrategy |
| 4443 | 3655 | - ScoredDialogGenerations |
| @@ -4447,9 +3659,13 @@ | ||
| 4447 | 3659 | - ShieldCallStep |
| 4448 | 3660 | - ShieldDefinition |
| 4449 | 3661 | - ShieldResponse |
| 3662 | + - SpanEndPayload | |
| 3663 | + - SpanStartPayload | |
| 3664 | + - SpanStatus | |
| 4450 | 3665 | - StopReason |
| 4451 | - - SyntheticDataGenerationRequest | |
| 4452 | - - SyntheticDataGenerationRequestWrapper | |
| 3666 | + - StructuredLogEvent | |
| 3667 | + - SupervisedFineTuneRequest | |
| 3668 | + - SyntheticDataGenerateRequest | |
| 4453 | 3669 | - SyntheticDataGenerationResponse |
| 4454 | 3670 | - SystemMessage |
| 4455 | 3671 | - TokenLogProbs |
| @@ -4463,17 +3679,13 @@ | ||
| 4463 | 3679 | - ToolPromptFormat |
| 4464 | 3680 | - ToolResponse |
| 4465 | 3681 | - ToolResponseMessage |
| 3682 | + - Trace | |
| 4466 | 3683 | - TrainEvalDataset |
| 4467 | 3684 | - TrainEvalDatasetColumnType |
| 4468 | 3685 | - TrainingConfig |
| 4469 | 3686 | - Turn |
| 4470 | 3687 | - URL |
| 3688 | + - UnstructuredLogEvent | |
| 4471 | 3689 | - UpdateDocumentsRequest |
| 4472 | - - UpdateExperimentRequest | |
| 4473 | - - UpdateExperimentRequestWrapper | |
| 4474 | - - UpdateRunRequest | |
| 4475 | - - UpdateRunRequestWrapper | |
| 4476 | - - UploadArtifactRequest | |
| 4477 | - - UploadArtifactRequestWrapper | |
| 4478 | 3690 | - UserMessage |
| 4479 | 3691 | - WolframAlphaToolDefinition |
modified rfcs/openapi_generator/pyopenapi/generator.py +3 −8
| @@ -471,14 +471,9 @@ | ||
| 471 | 471 | |
| 472 | 472 | from dataclasses import make_dataclass |
| 473 | 473 | |
| 474 | - if len(op.request_params) == 1 and "Request" in first[1].__name__: | |
| 475 | - # TODO(ashwin): Undo the "Request" hack and this entire block eventually | |
| 476 | - request_name = first[1].__name__ + "Wrapper" | |
| 477 | - request_type = make_dataclass(request_name, op.request_params) | |
| 478 | - else: | |
| 479 | - op_name = "".join(word.capitalize() for word in op.name.split("_")) | |
| 480 | - request_name = f"{op_name}Request" | |
| 481 | - request_type = make_dataclass(request_name, op.request_params) | |
| 474 | + op_name = "".join(word.capitalize() for word in op.name.split("_")) | |
| 475 | + request_name = f"{op_name}Request" | |
| 476 | + request_type = make_dataclass(request_name, op.request_params) | |
| 482 | 477 | |
| 483 | 478 | requestBody = RequestBody( |
| 484 | 479 | content={ |
modified tests/test_inference.py +6 −1
| @@ -249,7 +249,12 @@ | ||
| 249 | 249 | stream=True, |
| 250 | 250 | tools=[ToolDefinition(tool_name=BuiltinTool.brave_search)], |
| 251 | 251 | ) |
| 252 | - iterator = self.api.chat_completion(request) | |
| 252 | + iterator = self.api.chat_completion( | |
| 253 | + request.model, | |
| 254 | + request.messages, | |
| 255 | + stream=request.stream, | |
| 256 | + tools=request.tools, | |
| 257 | + ) | |
| 253 | 258 | |
| 254 | 259 | events = [] |
| 255 | 260 | async for chunk in iterator: |
modified tests/test_ollama_inference.py +3 −1
| @@ -61,7 +61,9 @@ | ||
| 61 | 61 | ], |
| 62 | 62 | stream=False, |
| 63 | 63 | ) |
| 64 | - iterator = self.api.chat_completion(request) | |
| 64 | + iterator = self.api.chat_completion( | |
| 65 | + request.model, request.messages, stream=request.stream | |
| 66 | + ) | |
| 65 | 67 | async for r in iterator: |
| 66 | 68 | response = r |
| 67 | 69 | print(response.completion_message.content) |