update generator & yaml spec

This commit is contained in:
Xi Yan 2024-09-09 10:39:29 -07:00
parent ee32de4c3f
commit 838ab91ebf
3 changed files with 214 additions and 45 deletions

View file

@ -21,7 +21,7 @@
"info": { "info": {
"title": "[DRAFT] Llama Stack Specification", "title": "[DRAFT] Llama Stack Specification",
"version": "0.0.1", "version": "0.0.1",
"description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-07 15:23:29.488676" "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-09 10:38:33.954536"
}, },
"servers": [ "servers": [
{ {
@ -277,7 +277,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/AgenticSystemTurnCreateRequest" "$ref": "#/components/schemas/CreateAgenticSystemTurnRequest"
} }
} }
}, },
@ -1024,7 +1024,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/LogSearchRequest" "$ref": "#/components/schemas/GetLogsRequest"
} }
} }
}, },
@ -1365,7 +1365,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/PostTrainingRLHFRequest" "$ref": "#/components/schemas/PreferenceOptimizeRequest"
} }
} }
}, },
@ -1425,7 +1425,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/RewardScoringRequest" "$ref": "#/components/schemas/RewardScoreRequest"
} }
} }
}, },
@ -1455,7 +1455,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/PostTrainingSFTRequest" "$ref": "#/components/schemas/SupervisedFineTuneRequest"
} }
} }
}, },
@ -1485,7 +1485,7 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/SyntheticDataGenerationRequest" "$ref": "#/components/schemas/SyntheticDataGenerateRequest"
} }
} }
}, },
@ -3181,6 +3181,18 @@
"mime_type" "mime_type"
] ]
}, },
"CreateAgenticSystemTurnRequest": {
"type": "object",
"properties": {
"request": {
"$ref": "#/components/schemas/AgenticSystemTurnCreateRequest"
}
},
"additionalProperties": false,
"required": [
"request"
]
},
"AgenticSystemTurnResponseEvent": { "AgenticSystemTurnResponseEvent": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -4643,6 +4655,18 @@
"query" "query"
] ]
}, },
"GetLogsRequest": {
"type": "object",
"properties": {
"request": {
"$ref": "#/components/schemas/LogSearchRequest"
}
},
"additionalProperties": false,
"required": [
"request"
]
},
"Log": { "Log": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5109,6 +5133,18 @@
"fsdp_cpu_offload" "fsdp_cpu_offload"
] ]
}, },
"PreferenceOptimizeRequest": {
"type": "object",
"properties": {
"request": {
"$ref": "#/components/schemas/PostTrainingRLHFRequest"
}
},
"additionalProperties": false,
"required": [
"request"
]
},
"QueryDocumentsRequest": { "QueryDocumentsRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5277,6 +5313,18 @@
], ],
"title": "Request to score a reward function. A list of prompts and a list of responses per prompt." "title": "Request to score a reward function. A list of prompts and a list of responses per prompt."
}, },
"RewardScoreRequest": {
"type": "object",
"properties": {
"request": {
"$ref": "#/components/schemas/RewardScoringRequest"
}
},
"additionalProperties": false,
"required": [
"request"
]
},
"RewardScoringResponse": { "RewardScoringResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5562,6 +5610,18 @@
"alpha" "alpha"
] ]
}, },
"SupervisedFineTuneRequest": {
"type": "object",
"properties": {
"request": {
"$ref": "#/components/schemas/PostTrainingSFTRequest"
}
},
"additionalProperties": false,
"required": [
"request"
]
},
"SyntheticDataGenerationRequest": { "SyntheticDataGenerationRequest": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5607,6 +5667,18 @@
], ],
"title": "Request to generate synthetic data. A small batch of prompts and a filtering function" "title": "Request to generate synthetic data. A small batch of prompts and a filtering function"
}, },
"SyntheticDataGenerateRequest": {
"type": "object",
"properties": {
"request": {
"$ref": "#/components/schemas/SyntheticDataGenerationRequest"
}
},
"additionalProperties": false,
"required": [
"request"
]
},
"SyntheticDataGenerationResponse": { "SyntheticDataGenerationResponse": {
"type": "object", "type": "object",
"properties": { "properties": {
@ -5810,36 +5882,36 @@
} }
], ],
"tags": [ "tags": [
{
"name": "Memory"
},
{ {
"name": "Telemetry" "name": "Telemetry"
}, },
{
"name": "Evaluations"
},
{
"name": "AgenticSystem"
},
{
"name": "Inference"
},
{
"name": "BatchInference"
},
{
"name": "PostTraining"
},
{ {
"name": "Datasets" "name": "Datasets"
}, },
{ {
"name": "Memory" "name": "PostTraining"
}, },
{ {
"name": "SyntheticDataGeneration" "name": "SyntheticDataGeneration"
}, },
{
"name": "Inference"
},
{
"name": "Evaluations"
},
{
"name": "BatchInference"
},
{ {
"name": "RewardScoring" "name": "RewardScoring"
}, },
{
"name": "AgenticSystem"
},
{ {
"name": "BatchChatCompletionRequest", "name": "BatchChatCompletionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchChatCompletionRequest\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchChatCompletionRequest\" />"
@ -6024,6 +6096,10 @@
"name": "Attachment", "name": "Attachment",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />"
}, },
{
"name": "CreateAgenticSystemTurnRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgenticSystemTurnRequest\" />"
},
{ {
"name": "AgenticSystemTurnResponseEvent", "name": "AgenticSystemTurnResponseEvent",
"description": "Streamed agent execution response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemTurnResponseEvent\" />" "description": "Streamed agent execution response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgenticSystemTurnResponseEvent\" />"
@ -6212,6 +6288,10 @@
"name": "LogSearchRequest", "name": "LogSearchRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/LogSearchRequest\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/LogSearchRequest\" />"
}, },
{
"name": "GetLogsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetLogsRequest\" />"
},
{ {
"name": "Log", "name": "Log",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Log\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Log\" />"
@ -6276,6 +6356,10 @@
"name": "TrainingConfig", "name": "TrainingConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/TrainingConfig\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/TrainingConfig\" />"
}, },
{
"name": "PreferenceOptimizeRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/PreferenceOptimizeRequest\" />"
},
{ {
"name": "QueryDocumentsRequest", "name": "QueryDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsRequest\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsRequest\" />"
@ -6292,6 +6376,10 @@
"name": "RewardScoringRequest", "name": "RewardScoringRequest",
"description": "Request to score a reward function. A list of prompts and a list of responses per prompt.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoringRequest\" />" "description": "Request to score a reward function. A list of prompts and a list of responses per prompt.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoringRequest\" />"
}, },
{
"name": "RewardScoreRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoreRequest\" />"
},
{ {
"name": "RewardScoringResponse", "name": "RewardScoringResponse",
"description": "Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoringResponse\" />" "description": "Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoringResponse\" />"
@ -6324,10 +6412,18 @@
"name": "QLoraFinetuningConfig", "name": "QLoraFinetuningConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QLoraFinetuningConfig\" />" "description": "<SchemaDefinition schemaRef=\"#/components/schemas/QLoraFinetuningConfig\" />"
}, },
{
"name": "SupervisedFineTuneRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SupervisedFineTuneRequest\" />"
},
{ {
"name": "SyntheticDataGenerationRequest", "name": "SyntheticDataGenerationRequest",
"description": "Request to generate synthetic data. A small batch of prompts and a filtering function\n\n<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerationRequest\" />" "description": "Request to generate synthetic data. A small batch of prompts and a filtering function\n\n<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerationRequest\" />"
}, },
{
"name": "SyntheticDataGenerateRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerateRequest\" />"
},
{ {
"name": "SyntheticDataGenerationResponse", "name": "SyntheticDataGenerationResponse",
"description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerationResponse\" />" "description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerationResponse\" />"
@ -6403,6 +6499,7 @@
"CompletionResponseStreamChunk", "CompletionResponseStreamChunk",
"CreateAgenticSystemRequest", "CreateAgenticSystemRequest",
"CreateAgenticSystemSessionRequest", "CreateAgenticSystemSessionRequest",
"CreateAgenticSystemTurnRequest",
"CreateDatasetRequest", "CreateDatasetRequest",
"CreateExperimentRequest", "CreateExperimentRequest",
"CreateMemoryBankRequest", "CreateMemoryBankRequest",
@ -6430,6 +6527,7 @@
"FunctionCallToolDefinition", "FunctionCallToolDefinition",
"GetAgenticSystemSessionRequest", "GetAgenticSystemSessionRequest",
"GetDocumentsRequest", "GetDocumentsRequest",
"GetLogsRequest",
"InferenceStep", "InferenceStep",
"InsertDocumentsRequest", "InsertDocumentsRequest",
"ListArtifactsRequest", "ListArtifactsRequest",
@ -6452,12 +6550,14 @@
"PostTrainingJobStatusResponse", "PostTrainingJobStatusResponse",
"PostTrainingRLHFRequest", "PostTrainingRLHFRequest",
"PostTrainingSFTRequest", "PostTrainingSFTRequest",
"PreferenceOptimizeRequest",
"QLoraFinetuningConfig", "QLoraFinetuningConfig",
"QueryDocumentsRequest", "QueryDocumentsRequest",
"QueryDocumentsResponse", "QueryDocumentsResponse",
"RLHFAlgorithm", "RLHFAlgorithm",
"RestAPIExecutionConfig", "RestAPIExecutionConfig",
"RestAPIMethod", "RestAPIMethod",
"RewardScoreRequest",
"RewardScoringRequest", "RewardScoringRequest",
"RewardScoringResponse", "RewardScoringResponse",
"Run", "Run",
@ -6470,6 +6570,8 @@
"ShieldDefinition", "ShieldDefinition",
"ShieldResponse", "ShieldResponse",
"StopReason", "StopReason",
"SupervisedFineTuneRequest",
"SyntheticDataGenerateRequest",
"SyntheticDataGenerationRequest", "SyntheticDataGenerationRequest",
"SyntheticDataGenerationResponse", "SyntheticDataGenerationResponse",
"SystemMessage", "SystemMessage",

View file

@ -838,6 +838,14 @@ components:
- agent_id - agent_id
- session_name - session_name
type: object type: object
CreateAgenticSystemTurnRequest:
additionalProperties: false
properties:
request:
$ref: '#/components/schemas/AgenticSystemTurnCreateRequest'
required:
- request
type: object
CreateDatasetRequest: CreateDatasetRequest:
additionalProperties: false additionalProperties: false
properties: properties:
@ -1285,6 +1293,14 @@ components:
required: required:
- document_ids - document_ids
type: object type: object
GetLogsRequest:
additionalProperties: false
properties:
request:
$ref: '#/components/schemas/LogSearchRequest'
required:
- request
type: object
InferenceStep: InferenceStep:
additionalProperties: false additionalProperties: false
properties: properties:
@ -1796,6 +1812,14 @@ components:
- logger_config - logger_config
title: Request to finetune a model. title: Request to finetune a model.
type: object type: object
PreferenceOptimizeRequest:
additionalProperties: false
properties:
request:
$ref: '#/components/schemas/PostTrainingRLHFRequest'
required:
- request
type: object
QLoraFinetuningConfig: QLoraFinetuningConfig:
additionalProperties: false additionalProperties: false
properties: properties:
@ -1908,6 +1932,14 @@ components:
- PUT - PUT
- DELETE - DELETE
type: string type: string
RewardScoreRequest:
additionalProperties: false
properties:
request:
$ref: '#/components/schemas/RewardScoringRequest'
required:
- request
type: object
RewardScoringRequest: RewardScoringRequest:
additionalProperties: false additionalProperties: false
properties: properties:
@ -2116,6 +2148,22 @@ components:
- end_of_message - end_of_message
- out_of_tokens - out_of_tokens
type: string type: string
SupervisedFineTuneRequest:
additionalProperties: false
properties:
request:
$ref: '#/components/schemas/PostTrainingSFTRequest'
required:
- request
type: object
SyntheticDataGenerateRequest:
additionalProperties: false
properties:
request:
$ref: '#/components/schemas/SyntheticDataGenerationRequest'
required:
- request
type: object
SyntheticDataGenerationRequest: SyntheticDataGenerationRequest:
additionalProperties: false additionalProperties: false
properties: properties:
@ -2609,7 +2657,7 @@ info:
description: "This is the specification of the llama stack that provides\n \ description: "This is the specification of the llama stack that provides\n \
\ a set of endpoints and their corresponding interfaces that are tailored\ \ a set of endpoints and their corresponding interfaces that are tailored\
\ to\n best leverage Llama Models. The specification is still in\ \ to\n best leverage Llama Models. The specification is still in\
\ draft and subject to change.\n Generated at 2024-09-07 15:23:29.488676" \ draft and subject to change.\n Generated at 2024-09-09 10:38:33.954536"
title: '[DRAFT] Llama Stack Specification' title: '[DRAFT] Llama Stack Specification'
version: 0.0.1 version: 0.0.1
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
@ -2741,7 +2789,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/AgenticSystemTurnCreateRequest' $ref: '#/components/schemas/CreateAgenticSystemTurnRequest'
required: true required: true
responses: responses:
'200': '200':
@ -3183,7 +3231,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/LogSearchRequest' $ref: '#/components/schemas/GetLogsRequest'
required: true required: true
responses: responses:
'200': '200':
@ -3442,7 +3490,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PostTrainingRLHFRequest' $ref: '#/components/schemas/PreferenceOptimizeRequest'
required: true required: true
responses: responses:
'200': '200':
@ -3460,7 +3508,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/PostTrainingSFTRequest' $ref: '#/components/schemas/SupervisedFineTuneRequest'
required: true required: true
responses: responses:
'200': '200':
@ -3478,7 +3526,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/RewardScoringRequest' $ref: '#/components/schemas/RewardScoreRequest'
required: true required: true
responses: responses:
'200': '200':
@ -3545,7 +3593,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/SyntheticDataGenerationRequest' $ref: '#/components/schemas/SyntheticDataGenerateRequest'
required: true required: true
responses: responses:
'200': '200':
@ -3561,16 +3609,16 @@ security:
servers: servers:
- url: http://any-hosted-llama-stack.com - url: http://any-hosted-llama-stack.com
tags: tags:
- name: Telemetry
- name: Evaluations
- name: AgenticSystem
- name: Inference
- name: BatchInference
- name: PostTraining
- name: Datasets
- name: Memory - name: Memory
- name: Telemetry
- name: Datasets
- name: PostTraining
- name: SyntheticDataGeneration - name: SyntheticDataGeneration
- name: Inference
- name: Evaluations
- name: BatchInference
- name: RewardScoring - name: RewardScoring
- name: AgenticSystem
- description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest" - description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest"
/> />
name: BatchChatCompletionRequest name: BatchChatCompletionRequest
@ -3711,6 +3759,9 @@ tags:
name: AgenticSystemTurnCreateRequest name: AgenticSystemTurnCreateRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" /> - description: <SchemaDefinition schemaRef="#/components/schemas/Attachment" />
name: Attachment name: Attachment
- description: <SchemaDefinition schemaRef="#/components/schemas/CreateAgenticSystemTurnRequest"
/>
name: CreateAgenticSystemTurnRequest
- description: 'Streamed agent execution response. - description: 'Streamed agent execution response.
@ -3867,6 +3918,8 @@ tags:
- description: <SchemaDefinition schemaRef="#/components/schemas/LogSearchRequest" - description: <SchemaDefinition schemaRef="#/components/schemas/LogSearchRequest"
/> />
name: LogSearchRequest name: LogSearchRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/GetLogsRequest" />
name: GetLogsRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/Log" /> - description: <SchemaDefinition schemaRef="#/components/schemas/Log" />
name: Log name: Log
- description: <SchemaDefinition schemaRef="#/components/schemas/Metric" /> - description: <SchemaDefinition schemaRef="#/components/schemas/Metric" />
@ -3921,6 +3974,9 @@ tags:
name: RLHFAlgorithm name: RLHFAlgorithm
- description: <SchemaDefinition schemaRef="#/components/schemas/TrainingConfig" /> - description: <SchemaDefinition schemaRef="#/components/schemas/TrainingConfig" />
name: TrainingConfig name: TrainingConfig
- description: <SchemaDefinition schemaRef="#/components/schemas/PreferenceOptimizeRequest"
/>
name: PreferenceOptimizeRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsRequest" - description: <SchemaDefinition schemaRef="#/components/schemas/QueryDocumentsRequest"
/> />
name: QueryDocumentsRequest name: QueryDocumentsRequest
@ -3936,6 +3992,9 @@ tags:
<SchemaDefinition schemaRef="#/components/schemas/RewardScoringRequest" />' <SchemaDefinition schemaRef="#/components/schemas/RewardScoringRequest" />'
name: RewardScoringRequest name: RewardScoringRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/RewardScoreRequest"
/>
name: RewardScoreRequest
- description: 'Response from the reward scoring. Batch of (prompt, response, score) - description: 'Response from the reward scoring. Batch of (prompt, response, score)
tuples that pass the threshold. tuples that pass the threshold.
@ -3964,6 +4023,9 @@ tags:
- description: <SchemaDefinition schemaRef="#/components/schemas/QLoraFinetuningConfig" - description: <SchemaDefinition schemaRef="#/components/schemas/QLoraFinetuningConfig"
/> />
name: QLoraFinetuningConfig name: QLoraFinetuningConfig
- description: <SchemaDefinition schemaRef="#/components/schemas/SupervisedFineTuneRequest"
/>
name: SupervisedFineTuneRequest
- description: 'Request to generate synthetic data. A small batch of prompts and a - description: 'Request to generate synthetic data. A small batch of prompts and a
filtering function filtering function
@ -3971,6 +4033,9 @@ tags:
<SchemaDefinition schemaRef="#/components/schemas/SyntheticDataGenerationRequest" <SchemaDefinition schemaRef="#/components/schemas/SyntheticDataGenerationRequest"
/>' />'
name: SyntheticDataGenerationRequest name: SyntheticDataGenerationRequest
- description: <SchemaDefinition schemaRef="#/components/schemas/SyntheticDataGenerateRequest"
/>
name: SyntheticDataGenerateRequest
- description: 'Response from the synthetic data generation. Batch of (prompt, response, - description: 'Response from the synthetic data generation. Batch of (prompt, response,
score) tuples that pass the threshold. score) tuples that pass the threshold.
@ -4040,6 +4105,7 @@ x-tagGroups:
- CompletionResponseStreamChunk - CompletionResponseStreamChunk
- CreateAgenticSystemRequest - CreateAgenticSystemRequest
- CreateAgenticSystemSessionRequest - CreateAgenticSystemSessionRequest
- CreateAgenticSystemTurnRequest
- CreateDatasetRequest - CreateDatasetRequest
- CreateExperimentRequest - CreateExperimentRequest
- CreateMemoryBankRequest - CreateMemoryBankRequest
@ -4067,6 +4133,7 @@ x-tagGroups:
- FunctionCallToolDefinition - FunctionCallToolDefinition
- GetAgenticSystemSessionRequest - GetAgenticSystemSessionRequest
- GetDocumentsRequest - GetDocumentsRequest
- GetLogsRequest
- InferenceStep - InferenceStep
- InsertDocumentsRequest - InsertDocumentsRequest
- ListArtifactsRequest - ListArtifactsRequest
@ -4089,12 +4156,14 @@ x-tagGroups:
- PostTrainingJobStatusResponse - PostTrainingJobStatusResponse
- PostTrainingRLHFRequest - PostTrainingRLHFRequest
- PostTrainingSFTRequest - PostTrainingSFTRequest
- PreferenceOptimizeRequest
- QLoraFinetuningConfig - QLoraFinetuningConfig
- QueryDocumentsRequest - QueryDocumentsRequest
- QueryDocumentsResponse - QueryDocumentsResponse
- RLHFAlgorithm - RLHFAlgorithm
- RestAPIExecutionConfig - RestAPIExecutionConfig
- RestAPIMethod - RestAPIMethod
- RewardScoreRequest
- RewardScoringRequest - RewardScoringRequest
- RewardScoringResponse - RewardScoringResponse
- Run - Run
@ -4107,6 +4176,8 @@ x-tagGroups:
- ShieldDefinition - ShieldDefinition
- ShieldResponse - ShieldResponse
- StopReason - StopReason
- SupervisedFineTuneRequest
- SyntheticDataGenerateRequest
- SyntheticDataGenerationRequest - SyntheticDataGenerationRequest
- SyntheticDataGenerationResponse - SyntheticDataGenerationResponse
- SystemMessage - SystemMessage

View file

@ -468,15 +468,11 @@ class Generator:
builder = ContentBuilder(self.schema_builder) builder = ContentBuilder(self.schema_builder)
first = next(iter(op.request_params)) first = next(iter(op.request_params))
request_name, request_type = first request_name, request_type = first
if len(op.request_params) == 1 and "Request" in first[1].__name__:
# TODO(ashwin): Undo the "Request" hack and this entire block eventually
request_name, request_type = first
else:
from dataclasses import make_dataclass
op_name = "".join(word.capitalize() for word in op.name.split("_")) from dataclasses import make_dataclass
request_name = f"{op_name}Request" op_name = "".join(word.capitalize() for word in op.name.split("_"))
request_type = make_dataclass(request_name, op.request_params) request_name = f"{op_name}Request"
request_type = make_dataclass(request_name, op.request_params)
requestBody = RequestBody( requestBody = RequestBody(
content={ content={