mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
openapi gen
This commit is contained in:
parent
9cc0a54f0b
commit
d2b62157a3
5 changed files with 1126 additions and 777 deletions
|
@ -33,7 +33,7 @@ schema_utils.json_schema_type = json_schema_type
|
||||||
|
|
||||||
from llama_models.llama3.api.datatypes import * # noqa: F403
|
from llama_models.llama3.api.datatypes import * # noqa: F403
|
||||||
from llama_stack.apis.agents import * # noqa: F403
|
from llama_stack.apis.agents import * # noqa: F403
|
||||||
from llama_stack.apis.dataset import * # noqa: F403
|
from llama_stack.apis.datasets import * # noqa: F403
|
||||||
from llama_stack.apis.evals import * # noqa: F403
|
from llama_stack.apis.evals import * # noqa: F403
|
||||||
from llama_stack.apis.inference import * # noqa: F403
|
from llama_stack.apis.inference import * # noqa: F403
|
||||||
from llama_stack.apis.batch_inference import * # noqa: F403
|
from llama_stack.apis.batch_inference import * # noqa: F403
|
||||||
|
@ -61,7 +61,7 @@ class LlamaStack(
|
||||||
Telemetry,
|
Telemetry,
|
||||||
PostTraining,
|
PostTraining,
|
||||||
Memory,
|
Memory,
|
||||||
Evaluations,
|
Evals,
|
||||||
Models,
|
Models,
|
||||||
Shields,
|
Shields,
|
||||||
Inspect,
|
Inspect,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -315,14 +315,6 @@ components:
|
||||||
- photogen
|
- photogen
|
||||||
- code_interpreter
|
- code_interpreter
|
||||||
type: string
|
type: string
|
||||||
CancelEvaluationJobRequest:
|
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
|
||||||
job_uuid:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- job_uuid
|
|
||||||
type: object
|
|
||||||
CancelTrainingJobRequest:
|
CancelTrainingJobRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -572,13 +564,45 @@ components:
|
||||||
CreateDatasetRequest:
|
CreateDatasetRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
dataset:
|
dataset_def:
|
||||||
$ref: '#/components/schemas/TrainEvalDataset'
|
oneOf:
|
||||||
uuid:
|
- $ref: '#/components/schemas/HuggingfaceDatasetDef'
|
||||||
|
- $ref: '#/components/schemas/CustomDatasetDef'
|
||||||
|
required:
|
||||||
|
- dataset_def
|
||||||
|
type: object
|
||||||
|
CreateDatasetResponse:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
msg:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- fail
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- uuid
|
- status
|
||||||
- dataset
|
type: object
|
||||||
|
CustomDatasetDef:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
rename_columns_map:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
const: custom
|
||||||
|
default: custom
|
||||||
|
type: string
|
||||||
|
url:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- identifier
|
||||||
|
- url
|
||||||
type: object
|
type: object
|
||||||
DPOAlignmentConfig:
|
DPOAlignmentConfig:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
@ -619,10 +643,23 @@ components:
|
||||||
DeleteDatasetRequest:
|
DeleteDatasetRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
dataset_uuid:
|
dataset_identifier:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- dataset_uuid
|
- dataset_identifier
|
||||||
|
type: object
|
||||||
|
DeleteDatasetResponse:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
msg:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- fail
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- status
|
||||||
type: object
|
type: object
|
||||||
DialogGenerations:
|
DialogGenerations:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
@ -701,78 +738,147 @@ components:
|
||||||
required:
|
required:
|
||||||
- embeddings
|
- embeddings
|
||||||
type: object
|
type: object
|
||||||
EvaluateQuestionAnsweringRequest:
|
EvalResult:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
metrics:
|
metrics:
|
||||||
items:
|
additionalProperties:
|
||||||
enum:
|
type: number
|
||||||
- em
|
type: object
|
||||||
- f1
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
required:
|
required:
|
||||||
- metrics
|
- metrics
|
||||||
|
title: Aggregated final evaluation result.
|
||||||
type: object
|
type: object
|
||||||
EvaluateSummarizationRequest:
|
EvaluateDatasetConfig:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
metrics:
|
dataset_identifier:
|
||||||
|
type: string
|
||||||
|
kwargs:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
row_limit:
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- dataset_identifier
|
||||||
|
type: object
|
||||||
|
EvaluateJudgeScoringConfig:
|
||||||
|
type: object
|
||||||
|
EvaluateModelGenerationConfig:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
kwargs:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
model:
|
||||||
|
type: string
|
||||||
|
sampling_params:
|
||||||
|
$ref: '#/components/schemas/SamplingParams'
|
||||||
|
required:
|
||||||
|
- model
|
||||||
|
- sampling_params
|
||||||
|
type: object
|
||||||
|
EvaluatePostprocessConfig:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
kwargs:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
EvaluatePreprocessConfig:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
kwargs:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
EvaluateProcessorConfig:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
postprocess_config:
|
||||||
|
$ref: '#/components/schemas/EvaluatePostprocessConfig'
|
||||||
|
preprocess_config:
|
||||||
|
$ref: '#/components/schemas/EvaluatePreprocessConfig'
|
||||||
|
processor_identifier:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- processor_identifier
|
||||||
|
type: object
|
||||||
|
EvaluateResponse:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
eval_result:
|
||||||
|
$ref: '#/components/schemas/EvalResult'
|
||||||
|
formatted_report:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- eval_result
|
||||||
|
title: Scores for evaluation.
|
||||||
|
type: object
|
||||||
|
EvaluateScoringConfig:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
scorer_config_list:
|
||||||
items:
|
items:
|
||||||
enum:
|
$ref: '#/components/schemas/EvaluateSingleScorerConfig'
|
||||||
- rouge
|
|
||||||
- bleu
|
|
||||||
type: string
|
|
||||||
type: array
|
type: array
|
||||||
required:
|
required:
|
||||||
- metrics
|
- scorer_config_list
|
||||||
type: object
|
type: object
|
||||||
EvaluateTextGenerationRequest:
|
EvaluateSingleScorerConfig:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
metrics:
|
llm_judge_config:
|
||||||
items:
|
$ref: '#/components/schemas/LLMJudgeConfig'
|
||||||
enum:
|
scorer_name:
|
||||||
- perplexity
|
|
||||||
- rouge
|
|
||||||
- bleu
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
required:
|
|
||||||
- metrics
|
|
||||||
type: object
|
|
||||||
EvaluationJob:
|
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
|
||||||
job_uuid:
|
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- job_uuid
|
- scorer_name
|
||||||
type: object
|
type: object
|
||||||
EvaluationJobArtifactsResponse:
|
EvaluateTaskConfig:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
job_uuid:
|
dataset_config:
|
||||||
type: string
|
$ref: '#/components/schemas/EvaluateDatasetConfig'
|
||||||
|
generation_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateModelGenerationConfig'
|
||||||
|
processor_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateProcessorConfig'
|
||||||
|
scoring_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateScoringConfig'
|
||||||
required:
|
required:
|
||||||
- job_uuid
|
- dataset_config
|
||||||
title: Artifacts of a evaluation job.
|
- processor_config
|
||||||
type: object
|
- generation_config
|
||||||
EvaluationJobLogStream:
|
- scoring_config
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
|
||||||
job_uuid:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- job_uuid
|
|
||||||
type: object
|
|
||||||
EvaluationJobStatusResponse:
|
|
||||||
additionalProperties: false
|
|
||||||
properties:
|
|
||||||
job_uuid:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- job_uuid
|
|
||||||
type: object
|
type: object
|
||||||
FinetuningAlgorithm:
|
FinetuningAlgorithm:
|
||||||
enum:
|
enum:
|
||||||
|
@ -845,6 +951,39 @@ components:
|
||||||
required:
|
required:
|
||||||
- status
|
- status
|
||||||
type: object
|
type: object
|
||||||
|
HuggingfaceDatasetDef:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
dataset_name:
|
||||||
|
type: string
|
||||||
|
dataset_path:
|
||||||
|
type: string
|
||||||
|
identifier:
|
||||||
|
type: string
|
||||||
|
kwargs:
|
||||||
|
additionalProperties:
|
||||||
|
oneOf:
|
||||||
|
- type: 'null'
|
||||||
|
- type: boolean
|
||||||
|
- type: number
|
||||||
|
- type: string
|
||||||
|
- type: array
|
||||||
|
- type: object
|
||||||
|
type: object
|
||||||
|
rename_columns_map:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type:
|
||||||
|
const: huggingface
|
||||||
|
default: huggingface
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- identifier
|
||||||
|
- dataset_path
|
||||||
|
- kwargs
|
||||||
|
type: object
|
||||||
ImageMedia:
|
ImageMedia:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -936,6 +1075,20 @@ components:
|
||||||
- provider_id
|
- provider_id
|
||||||
- type
|
- type
|
||||||
type: object
|
type: object
|
||||||
|
LLMJudgeConfig:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
judge_model_generation_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateModelGenerationConfig'
|
||||||
|
judge_processor_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateProcessorConfig'
|
||||||
|
judge_scoring_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateJudgeScoringConfig'
|
||||||
|
required:
|
||||||
|
- judge_processor_config
|
||||||
|
- judge_model_generation_config
|
||||||
|
- judge_scoring_config
|
||||||
|
type: object
|
||||||
LogEventRequest:
|
LogEventRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -1629,6 +1782,32 @@ components:
|
||||||
- method
|
- method
|
||||||
- provider_types
|
- provider_types
|
||||||
type: object
|
type: object
|
||||||
|
RunEvalTaskRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
dataset:
|
||||||
|
type: string
|
||||||
|
eval_task_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateTaskConfig'
|
||||||
|
model:
|
||||||
|
type: string
|
||||||
|
task:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- model
|
||||||
|
- task
|
||||||
|
type: object
|
||||||
|
RunScorerRequest:
|
||||||
|
additionalProperties: false
|
||||||
|
properties:
|
||||||
|
dataset_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateDatasetConfig'
|
||||||
|
eval_scoring_config:
|
||||||
|
$ref: '#/components/schemas/EvaluateScoringConfig'
|
||||||
|
required:
|
||||||
|
- dataset_config
|
||||||
|
- eval_scoring_config
|
||||||
|
type: object
|
||||||
RunShieldRequest:
|
RunShieldRequest:
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
|
@ -2507,7 +2686,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-10-09 21:10:09.073430"
|
\ draft and subject to change.\n Generated at 2024-10-15 00:44:26.278642"
|
||||||
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
|
||||||
|
@ -2693,7 +2872,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
content:
|
content:
|
||||||
application/json:
|
text/event-stream:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AgentTurnResponseStreamChunk'
|
$ref: '#/components/schemas/AgentTurnResponseStreamChunk'
|
||||||
description: OK
|
description: OK
|
||||||
|
@ -2796,6 +2975,10 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/CreateDatasetResponse'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Datasets
|
- Datasets
|
||||||
|
@ -2817,6 +3000,10 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/DeleteDatasetResponse'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Datasets
|
- Datasets
|
||||||
|
@ -2824,7 +3011,7 @@ paths:
|
||||||
get:
|
get:
|
||||||
parameters:
|
parameters:
|
||||||
- in: query
|
- in: query
|
||||||
name: dataset_uuid
|
name: dataset_identifier
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
@ -2840,104 +3027,15 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/TrainEvalDataset'
|
oneOf:
|
||||||
|
- oneOf:
|
||||||
|
- $ref: '#/components/schemas/HuggingfaceDatasetDef'
|
||||||
|
- $ref: '#/components/schemas/CustomDatasetDef'
|
||||||
|
- type: 'null'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Datasets
|
- Datasets
|
||||||
/evaluate/job/artifacts:
|
/datasets/list:
|
||||||
get:
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: job_uuid
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
|
||||||
adapter servicing the API
|
|
||||||
in: header
|
|
||||||
name: X-LlamaStack-ProviderData
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/EvaluationJobArtifactsResponse'
|
|
||||||
description: OK
|
|
||||||
tags:
|
|
||||||
- Evaluations
|
|
||||||
/evaluate/job/cancel:
|
|
||||||
post:
|
|
||||||
parameters:
|
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
|
||||||
adapter servicing the API
|
|
||||||
in: header
|
|
||||||
name: X-LlamaStack-ProviderData
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/CancelEvaluationJobRequest'
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
tags:
|
|
||||||
- Evaluations
|
|
||||||
/evaluate/job/logs:
|
|
||||||
get:
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: job_uuid
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
|
||||||
adapter servicing the API
|
|
||||||
in: header
|
|
||||||
name: X-LlamaStack-ProviderData
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/EvaluationJobLogStream'
|
|
||||||
description: OK
|
|
||||||
tags:
|
|
||||||
- Evaluations
|
|
||||||
/evaluate/job/status:
|
|
||||||
get:
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: job_uuid
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
|
||||||
adapter servicing the API
|
|
||||||
in: header
|
|
||||||
name: X-LlamaStack-ProviderData
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/EvaluationJobStatusResponse'
|
|
||||||
description: OK
|
|
||||||
tags:
|
|
||||||
- Evaluations
|
|
||||||
/evaluate/jobs:
|
|
||||||
get:
|
get:
|
||||||
parameters:
|
parameters:
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
@ -2952,11 +3050,13 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/jsonl:
|
application/jsonl:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/EvaluationJob'
|
oneOf:
|
||||||
|
- $ref: '#/components/schemas/HuggingfaceDatasetDef'
|
||||||
|
- $ref: '#/components/schemas/CustomDatasetDef'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Evaluations
|
- Datasets
|
||||||
/evaluate/question_answering/:
|
/evals/run_eval_task:
|
||||||
post:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
@ -2970,18 +3070,18 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/EvaluateQuestionAnsweringRequest'
|
$ref: '#/components/schemas/RunEvalTaskRequest'
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/EvaluationJob'
|
$ref: '#/components/schemas/EvaluateResponse'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Evaluations
|
- Evals
|
||||||
/evaluate/summarization/:
|
/evals/run_scorer:
|
||||||
post:
|
post:
|
||||||
parameters:
|
parameters:
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
- description: JSON-encoded provider data which will be made available to the
|
||||||
|
@ -2995,42 +3095,17 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/EvaluateSummarizationRequest'
|
$ref: '#/components/schemas/RunScorerRequest'
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/EvaluationJob'
|
$ref: '#/components/schemas/EvaluateResponse'
|
||||||
description: OK
|
description: OK
|
||||||
tags:
|
tags:
|
||||||
- Evaluations
|
- Evals
|
||||||
/evaluate/text_generation/:
|
|
||||||
post:
|
|
||||||
parameters:
|
|
||||||
- description: JSON-encoded provider data which will be made available to the
|
|
||||||
adapter servicing the API
|
|
||||||
in: header
|
|
||||||
name: X-LlamaStack-ProviderData
|
|
||||||
required: false
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/EvaluateTextGenerationRequest'
|
|
||||||
required: true
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: '#/components/schemas/EvaluationJob'
|
|
||||||
description: OK
|
|
||||||
tags:
|
|
||||||
- Evaluations
|
|
||||||
/health:
|
/health:
|
||||||
get:
|
get:
|
||||||
parameters:
|
parameters:
|
||||||
|
@ -3712,20 +3787,20 @@ security:
|
||||||
servers:
|
servers:
|
||||||
- url: http://any-hosted-llama-stack.com
|
- url: http://any-hosted-llama-stack.com
|
||||||
tags:
|
tags:
|
||||||
- name: RewardScoring
|
- name: Models
|
||||||
|
- name: BatchInference
|
||||||
|
- name: Inspect
|
||||||
|
- name: Evals
|
||||||
|
- name: Safety
|
||||||
|
- name: Shields
|
||||||
|
- name: Telemetry
|
||||||
|
- name: Agents
|
||||||
- name: Memory
|
- name: Memory
|
||||||
- name: SyntheticDataGeneration
|
- name: SyntheticDataGeneration
|
||||||
- name: Models
|
|
||||||
- name: Safety
|
|
||||||
- name: BatchInference
|
|
||||||
- name: Agents
|
|
||||||
- name: MemoryBanks
|
|
||||||
- name: Shields
|
|
||||||
- name: Datasets
|
|
||||||
- name: Evaluations
|
|
||||||
- name: Inspect
|
|
||||||
- name: PostTraining
|
- name: PostTraining
|
||||||
- name: Telemetry
|
- name: Datasets
|
||||||
|
- name: MemoryBanks
|
||||||
|
- name: RewardScoring
|
||||||
- name: Inference
|
- name: Inference
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/BuiltinTool" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/BuiltinTool" />
|
||||||
name: BuiltinTool
|
name: BuiltinTool
|
||||||
|
@ -3782,9 +3857,6 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/BatchCompletionResponse"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/BatchCompletionResponse"
|
||||||
/>
|
/>
|
||||||
name: BatchCompletionResponse
|
name: BatchCompletionResponse
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/CancelEvaluationJobRequest"
|
|
||||||
/>
|
|
||||||
name: CancelEvaluationJobRequest
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/CancelTrainingJobRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/CancelTrainingJobRequest"
|
||||||
/>
|
/>
|
||||||
name: CancelTrainingJobRequest
|
name: CancelTrainingJobRequest
|
||||||
|
@ -3919,17 +3991,18 @@ tags:
|
||||||
name: Turn
|
name: Turn
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ViolationLevel" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ViolationLevel" />
|
||||||
name: ViolationLevel
|
name: ViolationLevel
|
||||||
- description: 'Dataset to be used for training or evaluating language models.
|
- description: <SchemaDefinition schemaRef="#/components/schemas/CustomDatasetDef"
|
||||||
|
|
||||||
|
|
||||||
<SchemaDefinition schemaRef="#/components/schemas/TrainEvalDataset" />'
|
|
||||||
name: TrainEvalDataset
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/TrainEvalDatasetColumnType"
|
|
||||||
/>
|
/>
|
||||||
name: TrainEvalDatasetColumnType
|
name: CustomDatasetDef
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/HuggingfaceDatasetDef"
|
||||||
|
/>
|
||||||
|
name: HuggingfaceDatasetDef
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/CreateDatasetRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/CreateDatasetRequest"
|
||||||
/>
|
/>
|
||||||
name: CreateDatasetRequest
|
name: CreateDatasetRequest
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/CreateDatasetResponse"
|
||||||
|
/>
|
||||||
|
name: CreateDatasetResponse
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/DeleteAgentsRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/DeleteAgentsRequest"
|
||||||
/>
|
/>
|
||||||
name: DeleteAgentsRequest
|
name: DeleteAgentsRequest
|
||||||
|
@ -3939,23 +4012,15 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/DeleteDatasetRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/DeleteDatasetRequest"
|
||||||
/>
|
/>
|
||||||
name: DeleteDatasetRequest
|
name: DeleteDatasetRequest
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/DeleteDatasetResponse"
|
||||||
|
/>
|
||||||
|
name: DeleteDatasetResponse
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EmbeddingsRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EmbeddingsRequest"
|
||||||
/>
|
/>
|
||||||
name: EmbeddingsRequest
|
name: EmbeddingsRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EmbeddingsResponse"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EmbeddingsResponse"
|
||||||
/>
|
/>
|
||||||
name: EmbeddingsResponse
|
name: EmbeddingsResponse
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateQuestionAnsweringRequest"
|
|
||||||
/>
|
|
||||||
name: EvaluateQuestionAnsweringRequest
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluationJob" />
|
|
||||||
name: EvaluationJob
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateSummarizationRequest"
|
|
||||||
/>
|
|
||||||
name: EvaluateSummarizationRequest
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateTextGenerationRequest"
|
|
||||||
/>
|
|
||||||
name: EvaluateTextGenerationRequest
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/GetAgentsSessionRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/GetAgentsSessionRequest"
|
||||||
/>
|
/>
|
||||||
name: GetAgentsSessionRequest
|
name: GetAgentsSessionRequest
|
||||||
|
@ -3979,18 +4044,6 @@ tags:
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentStepResponse"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/AgentStepResponse"
|
||||||
/>
|
/>
|
||||||
name: AgentStepResponse
|
name: AgentStepResponse
|
||||||
- description: 'Artifacts of a evaluation job.
|
|
||||||
|
|
||||||
|
|
||||||
<SchemaDefinition schemaRef="#/components/schemas/EvaluationJobArtifactsResponse"
|
|
||||||
/>'
|
|
||||||
name: EvaluationJobArtifactsResponse
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluationJobLogStream"
|
|
||||||
/>
|
|
||||||
name: EvaluationJobLogStream
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluationJobStatusResponse"
|
|
||||||
/>
|
|
||||||
name: EvaluationJobStatusResponse
|
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ModelDefWithProvider"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ModelDefWithProvider"
|
||||||
/>
|
/>
|
||||||
name: ModelDefWithProvider
|
name: ModelDefWithProvider
|
||||||
|
@ -4067,6 +4120,14 @@ tags:
|
||||||
name: OptimizerConfig
|
name: OptimizerConfig
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/RLHFAlgorithm" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/RLHFAlgorithm" />
|
||||||
name: RLHFAlgorithm
|
name: RLHFAlgorithm
|
||||||
|
- description: 'Dataset to be used for training or evaluating language models.
|
||||||
|
|
||||||
|
|
||||||
|
<SchemaDefinition schemaRef="#/components/schemas/TrainEvalDataset" />'
|
||||||
|
name: TrainEvalDataset
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/TrainEvalDatasetColumnType"
|
||||||
|
/>
|
||||||
|
name: TrainEvalDatasetColumnType
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/TrainingConfig" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/TrainingConfig" />
|
||||||
name: TrainingConfig
|
name: TrainingConfig
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/PreferenceOptimizeRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/PreferenceOptimizeRequest"
|
||||||
|
@ -4104,6 +4165,51 @@ tags:
|
||||||
name: ScoredDialogGenerations
|
name: ScoredDialogGenerations
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoredMessage" />
|
- description: <SchemaDefinition schemaRef="#/components/schemas/ScoredMessage" />
|
||||||
name: ScoredMessage
|
name: ScoredMessage
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateDatasetConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateDatasetConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateJudgeScoringConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateJudgeScoringConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateModelGenerationConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateModelGenerationConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluatePostprocessConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluatePostprocessConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluatePreprocessConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluatePreprocessConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateProcessorConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateProcessorConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateScoringConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateScoringConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateSingleScorerConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateSingleScorerConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/EvaluateTaskConfig"
|
||||||
|
/>
|
||||||
|
name: EvaluateTaskConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/LLMJudgeConfig" />
|
||||||
|
name: LLMJudgeConfig
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/RunEvalTaskRequest"
|
||||||
|
/>
|
||||||
|
name: RunEvalTaskRequest
|
||||||
|
- description: 'Aggregated final evaluation result.
|
||||||
|
|
||||||
|
|
||||||
|
<SchemaDefinition schemaRef="#/components/schemas/EvalResult" />'
|
||||||
|
name: EvalResult
|
||||||
|
- description: 'Scores for evaluation.
|
||||||
|
|
||||||
|
|
||||||
|
<SchemaDefinition schemaRef="#/components/schemas/EvaluateResponse" />'
|
||||||
|
name: EvaluateResponse
|
||||||
|
- description: <SchemaDefinition schemaRef="#/components/schemas/RunScorerRequest"
|
||||||
|
/>
|
||||||
|
name: RunScorerRequest
|
||||||
- description: <SchemaDefinition schemaRef="#/components/schemas/RunShieldRequest"
|
- description: <SchemaDefinition schemaRef="#/components/schemas/RunShieldRequest"
|
||||||
/>
|
/>
|
||||||
name: RunShieldRequest
|
name: RunShieldRequest
|
||||||
|
@ -4141,7 +4247,7 @@ x-tagGroups:
|
||||||
- Agents
|
- Agents
|
||||||
- BatchInference
|
- BatchInference
|
||||||
- Datasets
|
- Datasets
|
||||||
- Evaluations
|
- Evals
|
||||||
- Inference
|
- Inference
|
||||||
- Inspect
|
- Inspect
|
||||||
- Memory
|
- Memory
|
||||||
|
@ -4172,7 +4278,6 @@ x-tagGroups:
|
||||||
- BatchCompletionRequest
|
- BatchCompletionRequest
|
||||||
- BatchCompletionResponse
|
- BatchCompletionResponse
|
||||||
- BuiltinTool
|
- BuiltinTool
|
||||||
- CancelEvaluationJobRequest
|
|
||||||
- CancelTrainingJobRequest
|
- CancelTrainingJobRequest
|
||||||
- ChatCompletionRequest
|
- ChatCompletionRequest
|
||||||
- ChatCompletionResponse
|
- ChatCompletionResponse
|
||||||
|
@ -4189,31 +4294,40 @@ x-tagGroups:
|
||||||
- CreateAgentSessionRequest
|
- CreateAgentSessionRequest
|
||||||
- CreateAgentTurnRequest
|
- CreateAgentTurnRequest
|
||||||
- CreateDatasetRequest
|
- CreateDatasetRequest
|
||||||
|
- CreateDatasetResponse
|
||||||
|
- CustomDatasetDef
|
||||||
- DPOAlignmentConfig
|
- DPOAlignmentConfig
|
||||||
- DeleteAgentsRequest
|
- DeleteAgentsRequest
|
||||||
- DeleteAgentsSessionRequest
|
- DeleteAgentsSessionRequest
|
||||||
- DeleteDatasetRequest
|
- DeleteDatasetRequest
|
||||||
|
- DeleteDatasetResponse
|
||||||
- DialogGenerations
|
- DialogGenerations
|
||||||
- DoraFinetuningConfig
|
- DoraFinetuningConfig
|
||||||
- EmbeddingsRequest
|
- EmbeddingsRequest
|
||||||
- EmbeddingsResponse
|
- EmbeddingsResponse
|
||||||
- EvaluateQuestionAnsweringRequest
|
- EvalResult
|
||||||
- EvaluateSummarizationRequest
|
- EvaluateDatasetConfig
|
||||||
- EvaluateTextGenerationRequest
|
- EvaluateJudgeScoringConfig
|
||||||
- EvaluationJob
|
- EvaluateModelGenerationConfig
|
||||||
- EvaluationJobArtifactsResponse
|
- EvaluatePostprocessConfig
|
||||||
- EvaluationJobLogStream
|
- EvaluatePreprocessConfig
|
||||||
- EvaluationJobStatusResponse
|
- EvaluateProcessorConfig
|
||||||
|
- EvaluateResponse
|
||||||
|
- EvaluateScoringConfig
|
||||||
|
- EvaluateSingleScorerConfig
|
||||||
|
- EvaluateTaskConfig
|
||||||
- FinetuningAlgorithm
|
- FinetuningAlgorithm
|
||||||
- FunctionCallToolDefinition
|
- FunctionCallToolDefinition
|
||||||
- GetAgentsSessionRequest
|
- GetAgentsSessionRequest
|
||||||
- GraphMemoryBankDef
|
- GraphMemoryBankDef
|
||||||
- HealthInfo
|
- HealthInfo
|
||||||
|
- HuggingfaceDatasetDef
|
||||||
- ImageMedia
|
- ImageMedia
|
||||||
- InferenceStep
|
- InferenceStep
|
||||||
- InsertDocumentsRequest
|
- InsertDocumentsRequest
|
||||||
- KeyValueMemoryBankDef
|
- KeyValueMemoryBankDef
|
||||||
- KeywordMemoryBankDef
|
- KeywordMemoryBankDef
|
||||||
|
- LLMJudgeConfig
|
||||||
- LogEventRequest
|
- LogEventRequest
|
||||||
- LogSeverity
|
- LogSeverity
|
||||||
- LoraFinetuningConfig
|
- LoraFinetuningConfig
|
||||||
|
@ -4243,6 +4357,8 @@ x-tagGroups:
|
||||||
- RewardScoreRequest
|
- RewardScoreRequest
|
||||||
- RewardScoringResponse
|
- RewardScoringResponse
|
||||||
- RouteInfo
|
- RouteInfo
|
||||||
|
- RunEvalTaskRequest
|
||||||
|
- RunScorerRequest
|
||||||
- RunShieldRequest
|
- RunShieldRequest
|
||||||
- RunShieldResponse
|
- RunShieldResponse
|
||||||
- SafetyViolation
|
- SafetyViolation
|
||||||
|
|
|
@ -15,6 +15,26 @@ from pydantic import BaseModel, Field
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class TrainEvalDatasetColumnType(Enum):
|
||||||
|
dialog = "dialog"
|
||||||
|
text = "text"
|
||||||
|
media = "media"
|
||||||
|
number = "number"
|
||||||
|
json = "json"
|
||||||
|
|
||||||
|
|
||||||
|
@json_schema_type
|
||||||
|
class TrainEvalDataset(BaseModel):
|
||||||
|
"""Dataset to be used for training or evaluating language models."""
|
||||||
|
|
||||||
|
# TODO(ashwin): figure out if we need to add an enum for a "dataset type"
|
||||||
|
|
||||||
|
columns: Dict[str, TrainEvalDatasetColumnType]
|
||||||
|
content_url: URL
|
||||||
|
metadata: Optional[Dict[str, Any]] = None
|
||||||
|
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
class GenerationInput(BaseModel):
|
class GenerationInput(BaseModel):
|
||||||
messages: List[Message]
|
messages: List[Message]
|
||||||
|
|
|
@ -14,7 +14,7 @@ from llama_models.schema_utils import json_schema_type, webmethod
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
|
|
||||||
from llama_models.llama3.api.datatypes import * # noqa: F403
|
from llama_models.llama3.api.datatypes import * # noqa: F403
|
||||||
from llama_stack.apis.dataset import * # noqa: F403
|
from llama_stack.apis.datasets import * # noqa: F403
|
||||||
from llama_stack.apis.common.training_types import * # noqa: F403
|
from llama_stack.apis.common.training_types import * # noqa: F403
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue