mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-04 18:13:44 +00:00
4026 lines
122 KiB
YAML
4026 lines
122 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: Llama Stack API
|
|
description: A comprehensive API for building and deploying AI applications
|
|
version: 1.0.0
|
|
servers:
|
|
- url: https://api.llamastack.com
|
|
description: Production server
|
|
- url: https://staging-api.llamastack.com
|
|
description: Staging server
|
|
paths:
|
|
/v1beta/datasetio/append-rows/{dataset_id}:
|
|
post:
|
|
tags:
|
|
- V1Beta
|
|
summary: Append Rows
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
- name: dataset_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: dataset_id'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1beta/datasetio/iterrows/{dataset_id}:
|
|
get:
|
|
tags:
|
|
- V1Beta
|
|
summary: Iterrows
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get
|
|
parameters:
|
|
- name: dataset_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Dataset Id
|
|
- name: limit
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Limit
|
|
- name: start_index
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Start Index
|
|
responses:
|
|
'200':
|
|
description: A PaginatedResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1beta/datasets:
|
|
get:
|
|
tags:
|
|
- V1Beta
|
|
summary: List Datasets
|
|
description: Response-only endpoint for proper schema generation.
|
|
operationId: list_datasets_v1beta_datasets_get
|
|
responses:
|
|
'200':
|
|
description: A ListDatasetsResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ListDatasetsResponse'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
post:
|
|
tags:
|
|
- V1Beta
|
|
summary: Register Dataset
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: register_dataset_v1beta_datasets_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/__main_____datasets_Request'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: A Dataset.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Dataset'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
/v1beta/datasets/{dataset_id}:
|
|
delete:
|
|
tags:
|
|
- V1Beta
|
|
summary: Unregister Dataset
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: unregister_dataset_v1beta_datasets__dataset_id__delete
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
- name: dataset_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: dataset_id'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
get:
|
|
tags:
|
|
- V1Beta
|
|
summary: Get Dataset
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_dataset_v1beta_datasets__dataset_id__get
|
|
parameters:
|
|
- name: dataset_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Dataset Id
|
|
responses:
|
|
'200':
|
|
description: A Dataset.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Dataset'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/agents:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: List Agents
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: list_agents_v1alpha_agents_get
|
|
parameters:
|
|
- name: limit
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Limit
|
|
- name: start_index
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Start Index
|
|
responses:
|
|
'200':
|
|
description: A PaginatedResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Create Agent
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: create_agent_v1alpha_agents_post
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AgentConfig'
|
|
responses:
|
|
'200':
|
|
description: An AgentCreateResponse with the agent ID.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AgentCreateResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/agents/{agent_id}:
|
|
delete:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Delete Agent
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: delete_agent_v1alpha_agents__agent_id__delete
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: agent_id'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Agent
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_agent_v1alpha_agents__agent_id__get
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Agent Id
|
|
responses:
|
|
'200':
|
|
description: An Agent of the agent.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Agent'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/agents/{agent_id}/session:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Create Agent Session
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: create_agent_session_v1alpha_agents__agent_id__session_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/__main_____agents_agent_id_session_Request'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: An AgentSessionCreateResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AgentSessionCreateResponse'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: agent_id'
|
|
/v1alpha/agents/{agent_id}/session/{session_id}:
|
|
delete:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Delete Agents Session
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: delete_agents_session_v1alpha_agents__agent_id__session__session_id__delete
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: agent_id'
|
|
- name: session_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: session_id'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Agents Session
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_agents_session_v1alpha_agents__agent_id__session__session_id__get
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Agent Id
|
|
- name: session_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Session Id
|
|
- name: turn_ids
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Turn Ids
|
|
responses:
|
|
'200':
|
|
description: A Session.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Session'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/agents/{agent_id}/session/{session_id}/turn:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Create Agent Turn
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_Request'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: If stream=False, returns a Turn object.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Turn'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: agent_id'
|
|
- name: session_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: session_id'
|
|
/v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Agents Turn
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_agents_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__get
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Agent Id
|
|
- name: session_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Session Id
|
|
- name: turn_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Turn Id
|
|
responses:
|
|
'200':
|
|
description: A Turn.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Turn'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Resume Agent Turn
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: resume_agent_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__resume_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: A Turn object if stream is False, otherwise an AsyncIterator
|
|
of AgentTurnResponseStreamChunk objects.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Turn'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: agent_id'
|
|
- name: session_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: session_id'
|
|
- name: turn_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: turn_id'
|
|
/v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Agents Step
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_agents_step_v1alpha_agents__agent_id__session__session_id__turn__turn_id__step__step_id__get
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Agent Id
|
|
- name: session_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Session Id
|
|
- name: step_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Step Id
|
|
- name: turn_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Turn Id
|
|
responses:
|
|
'200':
|
|
description: An AgentStepResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AgentStepResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/agents/{agent_id}/sessions:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: List Agent Sessions
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: list_agent_sessions_v1alpha_agents__agent_id__sessions_get
|
|
parameters:
|
|
- name: agent_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Agent Id
|
|
- name: limit
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Limit
|
|
- name: start_index
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Start Index
|
|
responses:
|
|
'200':
|
|
description: A PaginatedResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PaginatedResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/eval/benchmarks:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: List Benchmarks
|
|
description: Response-only endpoint for proper schema generation.
|
|
operationId: list_benchmarks_v1alpha_eval_benchmarks_get
|
|
responses:
|
|
'200':
|
|
description: A ListBenchmarksResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ListBenchmarksResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Register Benchmark
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: register_benchmark_v1alpha_eval_benchmarks_post
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/eval/benchmarks/{benchmark_id}:
|
|
delete:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Unregister Benchmark
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: benchmark_id'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Benchmark
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get
|
|
parameters:
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Benchmark Id
|
|
responses:
|
|
'200':
|
|
description: A Benchmark.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Benchmark'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/eval/benchmarks/{benchmark_id}/evaluations:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Evaluate Rows
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BenchmarkConfig'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: EvaluateResponse object containing generations and scores.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/EvaluateResponse'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
parameters:
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: benchmark_id'
|
|
/v1alpha/eval/benchmarks/{benchmark_id}/jobs:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Run Eval
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BenchmarkConfig'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: The job that was created to run the evaluation.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Job'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
parameters:
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: benchmark_id'
|
|
/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}:
|
|
delete:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Job Cancel
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: benchmark_id'
|
|
- name: job_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
description: 'Path parameter: job_id'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Job Status
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get
|
|
parameters:
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Benchmark Id
|
|
- name: job_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Job Id
|
|
responses:
|
|
'200':
|
|
description: The status of the evaluation job.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Job'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Job Result
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get
|
|
parameters:
|
|
- name: benchmark_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Benchmark Id
|
|
- name: job_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Job Id
|
|
responses:
|
|
'200':
|
|
description: The result of the job.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/EvaluateResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/inference/rerank:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Rerank
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: rerank_v1alpha_inference_rerank_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/_inference_rerank_Request'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: RerankResponse with indices sorted by relevance score (descending).
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RerankResponse'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
/v1alpha/post-training/job/artifacts:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Training Job Artifacts
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get
|
|
parameters:
|
|
- name: job_uuid
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Job Uuid
|
|
responses:
|
|
'200':
|
|
description: A PostTrainingJobArtifactsResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PostTrainingJobArtifactsResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/post-training/job/cancel:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Cancel Training Job
|
|
description: Generic endpoint - this would be replaced with actual implementation.
|
|
operationId: cancel_training_job_v1alpha_post_training_job_cancel_post
|
|
parameters:
|
|
- name: args
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Args
|
|
- name: kwargs
|
|
in: query
|
|
required: true
|
|
schema:
|
|
title: Kwargs
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/post-training/job/status:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Training Job Status
|
|
description: Query endpoint for proper schema generation.
|
|
operationId: get_training_job_status_v1alpha_post_training_job_status_get
|
|
parameters:
|
|
- name: job_uuid
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Job Uuid
|
|
responses:
|
|
'200':
|
|
description: A PostTrainingJobStatusResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PostTrainingJobStatusResponse'
|
|
'400':
|
|
$ref: '#/components/responses/BadRequest400'
|
|
description: Bad Request
|
|
'429':
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
description: Too Many Requests
|
|
'500':
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
description: Internal Server Error
|
|
default:
|
|
$ref: '#/components/responses/DefaultError'
|
|
description: Default Response
|
|
/v1alpha/post-training/jobs:
|
|
get:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Get Training Jobs
|
|
description: Response-only endpoint for proper schema generation.
|
|
operationId: get_training_jobs_v1alpha_post_training_jobs_get
|
|
responses:
|
|
'200':
|
|
description: A ListPostTrainingJobsResponse.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ListPostTrainingJobsResponse'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
/v1alpha/post-training/preference-optimize:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Preference Optimize
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: preference_optimize_v1alpha_post_training_preference_optimize_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DPOAlignmentConfig'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: A PostTrainingJob.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PostTrainingJob'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
/v1alpha/post-training/supervised-fine-tune:
|
|
post:
|
|
tags:
|
|
- V1Alpha
|
|
summary: Supervised Fine Tune
|
|
description: Typed endpoint for proper schema generation.
|
|
operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/TrainingConfig'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: A PostTrainingJob.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PostTrainingJob'
|
|
'400':
|
|
description: Bad Request
|
|
$ref: '#/components/responses/BadRequest400'
|
|
'429':
|
|
description: Too Many Requests
|
|
$ref: '#/components/responses/TooManyRequests429'
|
|
'500':
|
|
description: Internal Server Error
|
|
$ref: '#/components/responses/InternalServerError500'
|
|
default:
|
|
description: Default Response
|
|
$ref: '#/components/responses/DefaultError'
|
|
components:
|
|
schemas:
|
|
AgentCandidate:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: agent
|
|
title: Type
|
|
default: agent
|
|
config:
|
|
$ref: '#/components/schemas/AgentConfig'
|
|
type: object
|
|
required:
|
|
- config
|
|
title: AgentCandidate
|
|
description: 'An agent candidate for evaluation.
|
|
|
|
|
|
:param config: The configuration for the agent candidate.'
|
|
AgentConfig:
|
|
properties:
|
|
sampling_params:
|
|
$ref: '#/components/schemas/SamplingParams'
|
|
input_shields:
|
|
title: Input Shields
|
|
items:
|
|
type: string
|
|
type: array
|
|
output_shields:
|
|
title: Output Shields
|
|
items:
|
|
type: string
|
|
type: array
|
|
toolgroups:
|
|
title: Toolgroups
|
|
items:
|
|
anyOf:
|
|
- type: string
|
|
- $ref: '#/components/schemas/AgentToolGroupWithArgs'
|
|
type: array
|
|
client_tools:
|
|
title: Client Tools
|
|
items:
|
|
$ref: '#/components/schemas/ToolDef'
|
|
type: array
|
|
tool_choice:
|
|
deprecated: true
|
|
$ref: '#/components/schemas/ToolChoice'
|
|
tool_prompt_format:
|
|
deprecated: true
|
|
$ref: '#/components/schemas/ToolPromptFormat'
|
|
tool_config:
|
|
$ref: '#/components/schemas/ToolConfig'
|
|
max_infer_iters:
|
|
title: Max Infer Iters
|
|
default: 10
|
|
type: integer
|
|
model:
|
|
type: string
|
|
title: Model
|
|
instructions:
|
|
type: string
|
|
title: Instructions
|
|
name:
|
|
title: Name
|
|
type: string
|
|
enable_session_persistence:
|
|
title: Enable Session Persistence
|
|
default: false
|
|
type: boolean
|
|
response_format:
|
|
title: Response Format
|
|
oneOf:
|
|
- $ref: '#/components/schemas/JsonSchemaResponseFormat'
|
|
- $ref: '#/components/schemas/GrammarResponseFormat'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
grammar: '#/components/schemas/GrammarResponseFormat'
|
|
json_schema: '#/components/schemas/JsonSchemaResponseFormat'
|
|
type: object
|
|
required:
|
|
- model
|
|
- instructions
|
|
title: AgentConfig
|
|
description: 'Configuration for an agent.
|
|
|
|
|
|
:param model: The model identifier to use for the agent
|
|
|
|
:param instructions: The system instructions for the agent
|
|
|
|
:param name: Optional name for the agent, used in telemetry and identification
|
|
|
|
:param enable_session_persistence: Optional flag indicating whether session
|
|
data has to be persisted
|
|
|
|
:param response_format: Optional response format configuration'
|
|
AgentCreateResponse:
|
|
properties:
|
|
agent_id:
|
|
type: string
|
|
title: Agent Id
|
|
type: object
|
|
required:
|
|
- agent_id
|
|
title: AgentCreateResponse
|
|
description: 'Response returned when creating a new agent.
|
|
|
|
|
|
:param agent_id: Unique identifier for the created agent'
|
|
AgentSessionCreateResponse:
|
|
properties:
|
|
session_id:
|
|
type: string
|
|
title: Session Id
|
|
type: object
|
|
required:
|
|
- session_id
|
|
title: AgentSessionCreateResponse
|
|
description: 'Response returned when creating a new agent session.
|
|
|
|
|
|
:param session_id: Unique identifier for the created session'
|
|
AgentToolGroupWithArgs:
|
|
properties:
|
|
name:
|
|
type: string
|
|
title: Name
|
|
args:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Args
|
|
type: object
|
|
required:
|
|
- name
|
|
- args
|
|
title: AgentToolGroupWithArgs
|
|
AggregationFunctionType:
|
|
type: string
|
|
enum:
|
|
- average
|
|
- weighted_average
|
|
- median
|
|
- categorical_count
|
|
- accuracy
|
|
title: AggregationFunctionType
|
|
description: 'Types of aggregation functions for scoring results.
|
|
|
|
:cvar average: Calculate the arithmetic mean of scores
|
|
|
|
:cvar weighted_average: Calculate a weighted average of scores
|
|
|
|
:cvar median: Calculate the median value of scores
|
|
|
|
:cvar categorical_count: Count occurrences of categorical values
|
|
|
|
:cvar accuracy: Calculate accuracy as the proportion of correct answers'
|
|
Attachment-Output:
|
|
properties:
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
- $ref: '#/components/schemas/URL'
|
|
title: Content
|
|
mime_type:
|
|
type: string
|
|
title: Mime Type
|
|
type: object
|
|
required:
|
|
- content
|
|
- mime_type
|
|
title: Attachment
|
|
description: 'An attachment to an agent turn.
|
|
|
|
|
|
:param content: The content of the attachment.
|
|
|
|
:param mime_type: The MIME type of the attachment.'
|
|
BasicScoringFnParams:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: basic
|
|
title: Type
|
|
default: basic
|
|
aggregation_functions:
|
|
items:
|
|
$ref: '#/components/schemas/AggregationFunctionType'
|
|
type: array
|
|
title: Aggregation Functions
|
|
description: Aggregation functions to apply to the scores of each row
|
|
type: object
|
|
title: BasicScoringFnParams
|
|
description: 'Parameters for basic scoring function configuration.
|
|
|
|
:param type: The type of scoring function parameters, always basic
|
|
|
|
:param aggregation_functions: Aggregation functions to apply to the scores
|
|
of each row'
|
|
Benchmark:
|
|
properties:
|
|
identifier:
|
|
type: string
|
|
title: Identifier
|
|
description: Unique identifier for this resource in llama stack
|
|
provider_resource_id:
|
|
title: Provider Resource Id
|
|
description: Unique identifier for this resource in the provider
|
|
type: string
|
|
provider_id:
|
|
type: string
|
|
title: Provider Id
|
|
description: ID of the provider that owns this resource
|
|
type:
|
|
type: string
|
|
const: benchmark
|
|
title: Type
|
|
default: benchmark
|
|
dataset_id:
|
|
type: string
|
|
title: Dataset Id
|
|
scoring_functions:
|
|
items:
|
|
type: string
|
|
type: array
|
|
title: Scoring Functions
|
|
metadata:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Metadata
|
|
description: Metadata for this evaluation task
|
|
type: object
|
|
required:
|
|
- identifier
|
|
- provider_id
|
|
- dataset_id
|
|
- scoring_functions
|
|
title: Benchmark
|
|
description: 'A benchmark resource for evaluating model performance.
|
|
|
|
|
|
:param dataset_id: Identifier of the dataset to use for the benchmark evaluation
|
|
|
|
:param scoring_functions: List of scoring function identifiers to apply during
|
|
evaluation
|
|
|
|
:param metadata: Metadata for this evaluation task
|
|
|
|
:param type: The resource type, always benchmark'
|
|
BenchmarkConfig:
|
|
properties:
|
|
eval_candidate:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ModelCandidate'
|
|
- $ref: '#/components/schemas/AgentCandidate'
|
|
title: Eval Candidate
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
agent: '#/components/schemas/AgentCandidate'
|
|
model: '#/components/schemas/ModelCandidate'
|
|
scoring_params:
|
|
additionalProperties:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
- $ref: '#/components/schemas/RegexParserScoringFnParams'
|
|
- $ref: '#/components/schemas/BasicScoringFnParams'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
basic: '#/components/schemas/BasicScoringFnParams'
|
|
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
|
|
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
|
|
type: object
|
|
title: Scoring Params
|
|
description: Map between scoring function id and parameters for each scoring
|
|
function you want to run
|
|
num_examples:
|
|
title: Num Examples
|
|
description: Number of examples to evaluate (useful for testing), if not
|
|
provided, all examples in the dataset will be evaluated
|
|
type: integer
|
|
type: object
|
|
required:
|
|
- eval_candidate
|
|
title: BenchmarkConfig
|
|
description: 'A benchmark configuration for evaluation.
|
|
|
|
|
|
:param eval_candidate: The candidate to evaluate.
|
|
|
|
:param scoring_params: Map between scoring function id and parameters for
|
|
each scoring function you want to run
|
|
|
|
:param num_examples: (Optional) The number of examples to evaluate. If not
|
|
provided, all examples in the dataset will be evaluated'
|
|
BuiltinTool:
|
|
type: string
|
|
enum:
|
|
- brave_search
|
|
- wolfram_alpha
|
|
- photogen
|
|
- code_interpreter
|
|
title: BuiltinTool
|
|
CompletionMessage-Output:
|
|
properties:
|
|
role:
|
|
type: string
|
|
const: assistant
|
|
title: Role
|
|
default: assistant
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
stop_reason:
|
|
$ref: '#/components/schemas/StopReason'
|
|
tool_calls:
|
|
title: Tool Calls
|
|
items:
|
|
$ref: '#/components/schemas/ToolCall'
|
|
type: array
|
|
type: object
|
|
required:
|
|
- content
|
|
- stop_reason
|
|
title: CompletionMessage
|
|
description: "A message containing the model's (assistant) response in a chat\
|
|
\ conversation.\n\n:param role: Must be \"assistant\" to identify this as\
|
|
\ the model's response\n:param content: The content of the model's response\n\
|
|
:param stop_reason: Reason why the model stopped generating. Options are:\n\
|
|
\ - `StopReason.end_of_turn`: The model finished generating the entire\
|
|
\ response.\n - `StopReason.end_of_message`: The model finished generating\
|
|
\ but generated a partial response -- usually, a tool call. The user may call\
|
|
\ the tool and continue the conversation with the tool's response.\n -\
|
|
\ `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls:\
|
|
\ List of tool calls. Each tool call is a ToolCall object."
|
|
DPOAlignmentConfig:
|
|
properties:
|
|
beta:
|
|
type: number
|
|
title: Beta
|
|
loss_type:
|
|
$ref: '#/components/schemas/DPOLossType'
|
|
default: sigmoid
|
|
type: object
|
|
required:
|
|
- beta
|
|
title: DPOAlignmentConfig
|
|
description: 'Configuration for Direct Preference Optimization (DPO) alignment.
|
|
|
|
|
|
:param beta: Temperature parameter for the DPO loss
|
|
|
|
:param loss_type: The type of loss function to use for DPO'
|
|
DPOLossType:
|
|
type: string
|
|
enum:
|
|
- sigmoid
|
|
- hinge
|
|
- ipo
|
|
- kto_pair
|
|
title: DPOLossType
|
|
DataConfig:
|
|
properties:
|
|
dataset_id:
|
|
type: string
|
|
title: Dataset Id
|
|
batch_size:
|
|
type: integer
|
|
title: Batch Size
|
|
shuffle:
|
|
type: boolean
|
|
title: Shuffle
|
|
data_format:
|
|
$ref: '#/components/schemas/DatasetFormat'
|
|
validation_dataset_id:
|
|
title: Validation Dataset Id
|
|
type: string
|
|
packed:
|
|
title: Packed
|
|
default: false
|
|
type: boolean
|
|
train_on_input:
|
|
title: Train On Input
|
|
default: false
|
|
type: boolean
|
|
type: object
|
|
required:
|
|
- dataset_id
|
|
- batch_size
|
|
- shuffle
|
|
- data_format
|
|
title: DataConfig
|
|
description: 'Configuration for training data and data loading.
|
|
|
|
|
|
:param dataset_id: Unique identifier for the training dataset
|
|
|
|
:param batch_size: Number of samples per training batch
|
|
|
|
:param shuffle: Whether to shuffle the dataset during training
|
|
|
|
:param data_format: Format of the dataset (instruct or dialog)
|
|
|
|
:param validation_dataset_id: (Optional) Unique identifier for the validation
|
|
dataset
|
|
|
|
:param packed: (Optional) Whether to pack multiple samples into a single sequence
|
|
for efficiency
|
|
|
|
:param train_on_input: (Optional) Whether to compute loss on input tokens
|
|
as well as output tokens'
|
|
Dataset:
|
|
properties:
|
|
identifier:
|
|
type: string
|
|
title: Identifier
|
|
description: Unique identifier for this resource in llama stack
|
|
provider_resource_id:
|
|
title: Provider Resource Id
|
|
description: Unique identifier for this resource in the provider
|
|
type: string
|
|
provider_id:
|
|
type: string
|
|
title: Provider Id
|
|
description: ID of the provider that owns this resource
|
|
type:
|
|
type: string
|
|
const: dataset
|
|
title: Type
|
|
default: dataset
|
|
purpose:
|
|
$ref: '#/components/schemas/DatasetPurpose'
|
|
source:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/URIDataSource'
|
|
- $ref: '#/components/schemas/RowsDataSource'
|
|
title: Source
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
rows: '#/components/schemas/RowsDataSource'
|
|
uri: '#/components/schemas/URIDataSource'
|
|
metadata:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Metadata
|
|
description: Any additional metadata for this dataset
|
|
type: object
|
|
required:
|
|
- identifier
|
|
- provider_id
|
|
- purpose
|
|
- source
|
|
title: Dataset
|
|
description: 'Dataset resource for storing and accessing training or evaluation
|
|
data.
|
|
|
|
|
|
:param type: Type of resource, always ''dataset'' for datasets'
|
|
DatasetFormat:
|
|
type: string
|
|
enum:
|
|
- instruct
|
|
- dialog
|
|
title: DatasetFormat
|
|
description: 'Format of the training dataset.
|
|
|
|
:cvar instruct: Instruction-following format with prompt and completion
|
|
|
|
:cvar dialog: Multi-turn conversation format with messages'
|
|
DatasetPurpose:
|
|
type: string
|
|
enum:
|
|
- post-training/messages
|
|
- eval/question-answer
|
|
- eval/messages-answer
|
|
title: DatasetPurpose
|
|
description: "Purpose of the dataset. Each purpose has a required input data\
|
|
\ schema.\n\n:cvar post-training/messages: The dataset contains messages used\
|
|
\ for post-training.\n {\n \"messages\": [\n {\"role\"\
|
|
: \"user\", \"content\": \"Hello, world!\"},\n {\"role\": \"assistant\"\
|
|
, \"content\": \"Hello, world!\"},\n ]\n }\n:cvar eval/question-answer:\
|
|
\ The dataset contains a question column and an answer column.\n {\n \
|
|
\ \"question\": \"What is the capital of France?\",\n \"answer\"\
|
|
: \"Paris\"\n }\n:cvar eval/messages-answer: The dataset contains a messages\
|
|
\ column with list of messages and an answer column.\n {\n \"messages\"\
|
|
: [\n {\"role\": \"user\", \"content\": \"Hello, my name is John\
|
|
\ Doe.\"},\n {\"role\": \"assistant\", \"content\": \"Hello, John\
|
|
\ Doe. How can I help you today?\"},\n {\"role\": \"user\", \"\
|
|
content\": \"What's my name?\"},\n ],\n \"answer\": \"John Doe\"\
|
|
\n }"
|
|
Document:
|
|
properties:
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
- $ref: '#/components/schemas/URL'
|
|
title: Content
|
|
mime_type:
|
|
type: string
|
|
title: Mime Type
|
|
type: object
|
|
required:
|
|
- content
|
|
- mime_type
|
|
title: Document
|
|
description: 'A document to be used by an agent.
|
|
|
|
|
|
:param content: The content of the document.
|
|
|
|
:param mime_type: The MIME type of the document.'
|
|
EfficiencyConfig:
|
|
properties:
|
|
enable_activation_checkpointing:
|
|
title: Enable Activation Checkpointing
|
|
default: false
|
|
type: boolean
|
|
enable_activation_offloading:
|
|
title: Enable Activation Offloading
|
|
default: false
|
|
type: boolean
|
|
memory_efficient_fsdp_wrap:
|
|
title: Memory Efficient Fsdp Wrap
|
|
default: false
|
|
type: boolean
|
|
fsdp_cpu_offload:
|
|
title: Fsdp Cpu Offload
|
|
default: false
|
|
type: boolean
|
|
type: object
|
|
title: EfficiencyConfig
|
|
description: 'Configuration for memory and compute efficiency optimizations.
|
|
|
|
|
|
:param enable_activation_checkpointing: (Optional) Whether to use activation
|
|
checkpointing to reduce memory usage
|
|
|
|
:param enable_activation_offloading: (Optional) Whether to offload activations
|
|
to CPU to save GPU memory
|
|
|
|
:param memory_efficient_fsdp_wrap: (Optional) Whether to use memory-efficient
|
|
FSDP wrapping
|
|
|
|
:param fsdp_cpu_offload: (Optional) Whether to offload FSDP parameters to
|
|
CPU'
|
|
EvaluateResponse:
|
|
properties:
|
|
generations:
|
|
items:
|
|
additionalProperties: true
|
|
type: object
|
|
type: array
|
|
title: Generations
|
|
scores:
|
|
additionalProperties:
|
|
$ref: '#/components/schemas/ScoringResult'
|
|
type: object
|
|
title: Scores
|
|
type: object
|
|
required:
|
|
- generations
|
|
- scores
|
|
title: EvaluateResponse
|
|
description: 'The response from an evaluation.
|
|
|
|
|
|
:param generations: The generations from the evaluation.
|
|
|
|
:param scores: The scores from the evaluation.'
|
|
GrammarResponseFormat:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: grammar
|
|
title: Type
|
|
default: grammar
|
|
bnf:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Bnf
|
|
type: object
|
|
required:
|
|
- bnf
|
|
title: GrammarResponseFormat
|
|
description: 'Configuration for grammar-guided response generation.
|
|
|
|
|
|
:param type: Must be "grammar" to identify this format type
|
|
|
|
:param bnf: The BNF grammar specification the response should conform to'
|
|
GreedySamplingStrategy:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: greedy
|
|
title: Type
|
|
default: greedy
|
|
type: object
|
|
title: GreedySamplingStrategy
|
|
description: 'Greedy sampling strategy that selects the highest probability
|
|
token at each step.
|
|
|
|
|
|
:param type: Must be "greedy" to identify this sampling strategy'
|
|
ImageContentItem-Input:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: image
|
|
title: Type
|
|
default: image
|
|
image:
|
|
$ref: '#/components/schemas/_URLOrData'
|
|
type: object
|
|
required:
|
|
- image
|
|
title: ImageContentItem
|
|
description: 'A image content item
|
|
|
|
|
|
:param type: Discriminator type of the content item. Always "image"
|
|
|
|
:param image: Image as a base64 encoded string or an URL'
|
|
ImageContentItem-Output:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: image
|
|
title: Type
|
|
default: image
|
|
image:
|
|
$ref: '#/components/schemas/_URLOrData'
|
|
type: object
|
|
required:
|
|
- image
|
|
title: ImageContentItem
|
|
description: 'A image content item
|
|
|
|
|
|
:param type: Discriminator type of the content item. Always "image"
|
|
|
|
:param image: Image as a base64 encoded string or an URL'
|
|
InferenceStep-Output:
|
|
properties:
|
|
turn_id:
|
|
type: string
|
|
title: Turn Id
|
|
step_id:
|
|
type: string
|
|
title: Step Id
|
|
started_at:
|
|
title: Started At
|
|
type: string
|
|
format: date-time
|
|
completed_at:
|
|
title: Completed At
|
|
type: string
|
|
format: date-time
|
|
step_type:
|
|
type: string
|
|
const: inference
|
|
title: Step Type
|
|
default: inference
|
|
model_response:
|
|
$ref: '#/components/schemas/CompletionMessage-Output'
|
|
type: object
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- model_response
|
|
title: InferenceStep
|
|
description: 'An inference step in an agent turn.
|
|
|
|
|
|
:param model_response: The response from the LLM.'
|
|
Job:
|
|
properties:
|
|
job_id:
|
|
type: string
|
|
title: Job Id
|
|
status:
|
|
$ref: '#/components/schemas/JobStatus'
|
|
type: object
|
|
required:
|
|
- job_id
|
|
- status
|
|
title: Job
|
|
description: 'A job execution instance with status tracking.
|
|
|
|
|
|
:param job_id: Unique identifier for the job
|
|
|
|
:param status: Current execution status of the job'
|
|
JobStatus:
|
|
type: string
|
|
enum:
|
|
- completed
|
|
- in_progress
|
|
- failed
|
|
- scheduled
|
|
- cancelled
|
|
title: JobStatus
|
|
description: 'Status of a job execution.
|
|
|
|
:cvar completed: Job has finished successfully
|
|
|
|
:cvar in_progress: Job is currently running
|
|
|
|
:cvar failed: Job has failed during execution
|
|
|
|
:cvar scheduled: Job is scheduled but not yet started
|
|
|
|
:cvar cancelled: Job was cancelled before completion'
|
|
JsonSchemaResponseFormat:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: json_schema
|
|
title: Type
|
|
default: json_schema
|
|
json_schema:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Json Schema
|
|
type: object
|
|
required:
|
|
- json_schema
|
|
title: JsonSchemaResponseFormat
|
|
description: 'Configuration for JSON schema-guided response generation.
|
|
|
|
|
|
:param type: Must be "json_schema" to identify this format type
|
|
|
|
:param json_schema: The JSON schema the response should conform to. In a Python
|
|
SDK, this is often a `pydantic` model.'
|
|
LLMAsJudgeScoringFnParams:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: llm_as_judge
|
|
title: Type
|
|
default: llm_as_judge
|
|
judge_model:
|
|
type: string
|
|
title: Judge Model
|
|
prompt_template:
|
|
title: Prompt Template
|
|
type: string
|
|
judge_score_regexes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
title: Judge Score Regexes
|
|
description: Regexes to extract the answer from generated response
|
|
aggregation_functions:
|
|
items:
|
|
$ref: '#/components/schemas/AggregationFunctionType'
|
|
type: array
|
|
title: Aggregation Functions
|
|
description: Aggregation functions to apply to the scores of each row
|
|
type: object
|
|
required:
|
|
- judge_model
|
|
title: LLMAsJudgeScoringFnParams
|
|
description: 'Parameters for LLM-as-judge scoring function configuration.
|
|
|
|
:param type: The type of scoring function parameters, always llm_as_judge
|
|
|
|
:param judge_model: Identifier of the LLM model to use as a judge for scoring
|
|
|
|
:param prompt_template: (Optional) Custom prompt template for the judge model
|
|
|
|
:param judge_score_regexes: Regexes to extract the answer from generated response
|
|
|
|
:param aggregation_functions: Aggregation functions to apply to the scores
|
|
of each row'
|
|
ListBenchmarksResponse:
|
|
properties:
|
|
data:
|
|
items:
|
|
$ref: '#/components/schemas/Benchmark'
|
|
type: array
|
|
title: Data
|
|
type: object
|
|
required:
|
|
- data
|
|
title: ListBenchmarksResponse
|
|
ListDatasetsResponse:
|
|
properties:
|
|
data:
|
|
items:
|
|
$ref: '#/components/schemas/Dataset'
|
|
type: array
|
|
title: Data
|
|
type: object
|
|
required:
|
|
- data
|
|
title: ListDatasetsResponse
|
|
description: 'Response from listing datasets.
|
|
|
|
|
|
:param data: List of datasets'
|
|
ListPostTrainingJobsResponse:
|
|
properties:
|
|
data:
|
|
items:
|
|
$ref: '#/components/schemas/PostTrainingJob'
|
|
type: array
|
|
title: Data
|
|
type: object
|
|
required:
|
|
- data
|
|
title: ListPostTrainingJobsResponse
|
|
MemoryRetrievalStep-Output:
|
|
properties:
|
|
turn_id:
|
|
type: string
|
|
title: Turn Id
|
|
step_id:
|
|
type: string
|
|
title: Step Id
|
|
started_at:
|
|
title: Started At
|
|
type: string
|
|
format: date-time
|
|
completed_at:
|
|
title: Completed At
|
|
type: string
|
|
format: date-time
|
|
step_type:
|
|
type: string
|
|
const: memory_retrieval
|
|
title: Step Type
|
|
default: memory_retrieval
|
|
vector_store_ids:
|
|
type: string
|
|
title: Vector Store Ids
|
|
inserted_context:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Inserted Context
|
|
type: object
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- vector_store_ids
|
|
- inserted_context
|
|
title: MemoryRetrievalStep
|
|
description: 'A memory retrieval step in an agent turn.
|
|
|
|
|
|
:param vector_store_ids: The IDs of the vector databases to retrieve context
|
|
from.
|
|
|
|
:param inserted_context: The context retrieved from the vector databases.'
|
|
ModelCandidate:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: model
|
|
title: Type
|
|
default: model
|
|
model:
|
|
type: string
|
|
title: Model
|
|
sampling_params:
|
|
$ref: '#/components/schemas/SamplingParams'
|
|
system_message:
|
|
$ref: '#/components/schemas/SystemMessage'
|
|
type: object
|
|
required:
|
|
- model
|
|
- sampling_params
|
|
title: ModelCandidate
|
|
description: 'A model candidate for evaluation.
|
|
|
|
|
|
:param model: The model ID to evaluate.
|
|
|
|
:param sampling_params: The sampling parameters for the model.
|
|
|
|
:param system_message: (Optional) The system message providing instructions
|
|
or context to the model.'
|
|
OptimizerConfig:
|
|
properties:
|
|
optimizer_type:
|
|
$ref: '#/components/schemas/OptimizerType'
|
|
lr:
|
|
type: number
|
|
title: Lr
|
|
weight_decay:
|
|
type: number
|
|
title: Weight Decay
|
|
num_warmup_steps:
|
|
type: integer
|
|
title: Num Warmup Steps
|
|
type: object
|
|
required:
|
|
- optimizer_type
|
|
- lr
|
|
- weight_decay
|
|
- num_warmup_steps
|
|
title: OptimizerConfig
|
|
description: 'Configuration parameters for the optimization algorithm.
|
|
|
|
|
|
:param optimizer_type: Type of optimizer to use (adam, adamw, or sgd)
|
|
|
|
:param lr: Learning rate for the optimizer
|
|
|
|
:param weight_decay: Weight decay coefficient for regularization
|
|
|
|
:param num_warmup_steps: Number of steps for learning rate warmup'
|
|
OptimizerType:
|
|
type: string
|
|
enum:
|
|
- adam
|
|
- adamw
|
|
- sgd
|
|
title: OptimizerType
|
|
description: 'Available optimizer algorithms for training.
|
|
|
|
:cvar adam: Adaptive Moment Estimation optimizer
|
|
|
|
:cvar adamw: AdamW optimizer with weight decay
|
|
|
|
:cvar sgd: Stochastic Gradient Descent optimizer'
|
|
PostTrainingJob:
|
|
properties:
|
|
job_uuid:
|
|
type: string
|
|
title: Job Uuid
|
|
type: object
|
|
required:
|
|
- job_uuid
|
|
title: PostTrainingJob
|
|
RegexParserScoringFnParams:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: regex_parser
|
|
title: Type
|
|
default: regex_parser
|
|
parsing_regexes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
title: Parsing Regexes
|
|
description: Regex to extract the answer from generated response
|
|
aggregation_functions:
|
|
items:
|
|
$ref: '#/components/schemas/AggregationFunctionType'
|
|
type: array
|
|
title: Aggregation Functions
|
|
description: Aggregation functions to apply to the scores of each row
|
|
type: object
|
|
title: RegexParserScoringFnParams
|
|
description: 'Parameters for regex parser scoring function configuration.
|
|
|
|
:param type: The type of scoring function parameters, always regex_parser
|
|
|
|
:param parsing_regexes: Regex to extract the answer from generated response
|
|
|
|
:param aggregation_functions: Aggregation functions to apply to the scores
|
|
of each row'
|
|
RerankData:
|
|
properties:
|
|
index:
|
|
type: integer
|
|
title: Index
|
|
relevance_score:
|
|
type: number
|
|
title: Relevance Score
|
|
type: object
|
|
required:
|
|
- index
|
|
- relevance_score
|
|
title: RerankData
|
|
description: 'A single rerank result from a reranking response.
|
|
|
|
|
|
:param index: The original index of the document in the input list
|
|
|
|
:param relevance_score: The relevance score from the model output. Values
|
|
are inverted when applicable so that higher scores indicate greater relevance.'
|
|
RerankResponse:
|
|
properties:
|
|
data:
|
|
items:
|
|
$ref: '#/components/schemas/RerankData'
|
|
type: array
|
|
title: Data
|
|
type: object
|
|
required:
|
|
- data
|
|
title: RerankResponse
|
|
description: 'Response from a reranking request.
|
|
|
|
|
|
:param data: List of rerank result objects, sorted by relevance score (descending)'
|
|
RowsDataSource:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: rows
|
|
title: Type
|
|
default: rows
|
|
rows:
|
|
items:
|
|
additionalProperties: true
|
|
type: object
|
|
type: array
|
|
title: Rows
|
|
type: object
|
|
required:
|
|
- rows
|
|
title: RowsDataSource
|
|
description: "A dataset stored in rows.\n:param rows: The dataset is stored\
|
|
\ in rows. E.g.\n - [\n {\"messages\": [{\"role\": \"user\", \"\
|
|
content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello,\
|
|
\ world!\"}]}\n ]"
|
|
SafetyViolation:
|
|
properties:
|
|
violation_level:
|
|
$ref: '#/components/schemas/ViolationLevel'
|
|
user_message:
|
|
title: User Message
|
|
type: string
|
|
metadata:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Metadata
|
|
type: object
|
|
required:
|
|
- violation_level
|
|
title: SafetyViolation
|
|
description: 'Details of a safety violation detected by content moderation.
|
|
|
|
|
|
:param violation_level: Severity level of the violation
|
|
|
|
:param user_message: (Optional) Message to convey to the user about the violation
|
|
|
|
:param metadata: Additional metadata including specific violation codes for
|
|
debugging and telemetry'
|
|
SamplingParams:
|
|
properties:
|
|
strategy:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/GreedySamplingStrategy'
|
|
- $ref: '#/components/schemas/TopPSamplingStrategy'
|
|
- $ref: '#/components/schemas/TopKSamplingStrategy'
|
|
title: Strategy
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
greedy: '#/components/schemas/GreedySamplingStrategy'
|
|
top_k: '#/components/schemas/TopKSamplingStrategy'
|
|
top_p: '#/components/schemas/TopPSamplingStrategy'
|
|
max_tokens:
|
|
title: Max Tokens
|
|
type: integer
|
|
repetition_penalty:
|
|
title: Repetition Penalty
|
|
default: 1.0
|
|
type: number
|
|
stop:
|
|
title: Stop
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
title: SamplingParams
|
|
description: "Sampling parameters.\n\n:param strategy: The sampling strategy.\n\
|
|
:param max_tokens: The maximum number of tokens that can be generated in the\
|
|
\ completion. The token count of\n your prompt plus max_tokens cannot exceed\
|
|
\ the model's context length.\n:param repetition_penalty: Number between -2.0\
|
|
\ and 2.0. Positive values penalize new tokens\n based on whether they\
|
|
\ appear in the text so far, increasing the model's likelihood to talk about\
|
|
\ new topics.\n:param stop: Up to 4 sequences where the API will stop generating\
|
|
\ further tokens.\n The returned text will not contain the stop sequence."
|
|
ScoringResult:
|
|
properties:
|
|
score_rows:
|
|
items:
|
|
additionalProperties: true
|
|
type: object
|
|
type: array
|
|
title: Score Rows
|
|
aggregated_results:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Aggregated Results
|
|
type: object
|
|
required:
|
|
- score_rows
|
|
- aggregated_results
|
|
title: ScoringResult
|
|
description: 'A scoring result for a single row.
|
|
|
|
|
|
:param score_rows: The scoring result for each row. Each row is a map of column
|
|
name to value.
|
|
|
|
:param aggregated_results: Map of metric name to aggregated value'
|
|
ShieldCallStep-Output:
|
|
properties:
|
|
turn_id:
|
|
type: string
|
|
title: Turn Id
|
|
step_id:
|
|
type: string
|
|
title: Step Id
|
|
started_at:
|
|
title: Started At
|
|
type: string
|
|
format: date-time
|
|
completed_at:
|
|
title: Completed At
|
|
type: string
|
|
format: date-time
|
|
step_type:
|
|
type: string
|
|
const: shield_call
|
|
title: Step Type
|
|
default: shield_call
|
|
violation:
|
|
$ref: '#/components/schemas/SafetyViolation'
|
|
type: object
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- violation
|
|
title: ShieldCallStep
|
|
description: 'A shield call step in an agent turn.
|
|
|
|
|
|
:param violation: The violation from the shield call.'
|
|
StopReason:
|
|
type: string
|
|
enum:
|
|
- end_of_turn
|
|
- end_of_message
|
|
- out_of_tokens
|
|
title: StopReason
|
|
SystemMessage:
|
|
properties:
|
|
role:
|
|
type: string
|
|
const: system
|
|
title: Role
|
|
default: system
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
type: object
|
|
required:
|
|
- content
|
|
title: SystemMessage
|
|
description: 'A system message providing instructions or context to the model.
|
|
|
|
|
|
:param role: Must be "system" to identify this as a system message
|
|
|
|
:param content: The content of the "system prompt". If multiple system messages
|
|
are provided, they are concatenated. The underlying Llama Stack code may also
|
|
add other system messages (for example, for formatting tool definitions).'
|
|
SystemMessageBehavior:
|
|
type: string
|
|
enum:
|
|
- append
|
|
- replace
|
|
title: SystemMessageBehavior
|
|
description: "Config for how to override the default system prompt.\n\n:cvar\
|
|
\ append: Appends the provided system message to the default system prompt:\n\
|
|
\ https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt-\n\
|
|
:cvar replace: Replaces the default system prompt with the provided system\
|
|
\ message. The system message can include the string\n '{{function_definitions}}'\
|
|
\ to indicate where the function definitions should be inserted."
|
|
TextContentItem:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: text
|
|
title: Type
|
|
default: text
|
|
text:
|
|
type: string
|
|
title: Text
|
|
type: object
|
|
required:
|
|
- text
|
|
title: TextContentItem
|
|
description: 'A text content item
|
|
|
|
|
|
:param type: Discriminator type of the content item. Always "text"
|
|
|
|
:param text: Text content'
|
|
ToolCall:
|
|
properties:
|
|
call_id:
|
|
type: string
|
|
title: Call Id
|
|
tool_name:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/BuiltinTool'
|
|
- type: string
|
|
title: Tool Name
|
|
arguments:
|
|
type: string
|
|
title: Arguments
|
|
type: object
|
|
required:
|
|
- call_id
|
|
- tool_name
|
|
- arguments
|
|
title: ToolCall
|
|
ToolChoice:
|
|
type: string
|
|
enum:
|
|
- auto
|
|
- required
|
|
- none
|
|
title: ToolChoice
|
|
description: 'Whether tool use is required or automatic. This is a hint to the
|
|
model which may not be followed. It depends on the Instruction Following capabilities
|
|
of the model.
|
|
|
|
|
|
:cvar auto: The model may use tools if it determines that is appropriate.
|
|
|
|
:cvar required: The model must use tools.
|
|
|
|
:cvar none: The model must not use tools.'
|
|
ToolConfig:
|
|
properties:
|
|
tool_choice:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/ToolChoice'
|
|
- type: string
|
|
title: Tool Choice
|
|
default: auto
|
|
tool_prompt_format:
|
|
$ref: '#/components/schemas/ToolPromptFormat'
|
|
system_message_behavior:
|
|
default: append
|
|
$ref: '#/components/schemas/SystemMessageBehavior'
|
|
type: object
|
|
title: ToolConfig
|
|
description: "Configuration for tool use.\n\n:param tool_choice: (Optional)\
|
|
\ Whether tool use is automatic, required, or none. Can also specify a tool\
|
|
\ name to use a specific tool. Defaults to ToolChoice.auto.\n:param tool_prompt_format:\
|
|
\ (Optional) Instructs the model how to format tool calls. By default, Llama\
|
|
\ Stack will attempt to use a format that is best adapted to the model.\n\
|
|
\ - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object.\n\
|
|
\ - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a <function=function_name>\
|
|
\ tag.\n - `ToolPromptFormat.python_list`: The tool calls are output as\
|
|
\ Python syntax -- a list of function calls.\n:param system_message_behavior:\
|
|
\ (Optional) Config for how to override the default system prompt.\n -\
|
|
\ `SystemMessageBehavior.append`: Appends the provided system message to the\
|
|
\ default system prompt.\n - `SystemMessageBehavior.replace`: Replaces\
|
|
\ the default system prompt with the provided system message. The system message\
|
|
\ can include the string\n '{{function_definitions}}' to indicate where\
|
|
\ the function definitions should be inserted."
|
|
ToolDef:
|
|
properties:
|
|
toolgroup_id:
|
|
title: Toolgroup Id
|
|
type: string
|
|
name:
|
|
type: string
|
|
title: Name
|
|
description:
|
|
title: Description
|
|
type: string
|
|
input_schema:
|
|
title: Input Schema
|
|
additionalProperties: true
|
|
type: object
|
|
output_schema:
|
|
title: Output Schema
|
|
additionalProperties: true
|
|
type: object
|
|
metadata:
|
|
title: Metadata
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
required:
|
|
- name
|
|
title: ToolDef
|
|
description: 'Tool definition used in runtime contexts.
|
|
|
|
|
|
:param name: Name of the tool
|
|
|
|
:param description: (Optional) Human-readable description of what the tool
|
|
does
|
|
|
|
:param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema)
|
|
|
|
:param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema)
|
|
|
|
:param metadata: (Optional) Additional metadata about the tool
|
|
|
|
:param toolgroup_id: (Optional) ID of the tool group this tool belongs to'
|
|
ToolExecutionStep-Output:
|
|
properties:
|
|
turn_id:
|
|
type: string
|
|
title: Turn Id
|
|
step_id:
|
|
type: string
|
|
title: Step Id
|
|
started_at:
|
|
title: Started At
|
|
type: string
|
|
format: date-time
|
|
completed_at:
|
|
title: Completed At
|
|
type: string
|
|
format: date-time
|
|
step_type:
|
|
type: string
|
|
const: tool_execution
|
|
title: Step Type
|
|
default: tool_execution
|
|
tool_calls:
|
|
items:
|
|
$ref: '#/components/schemas/ToolCall'
|
|
type: array
|
|
title: Tool Calls
|
|
tool_responses:
|
|
items:
|
|
$ref: '#/components/schemas/ToolResponse-Output'
|
|
type: array
|
|
title: Tool Responses
|
|
type: object
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- tool_calls
|
|
- tool_responses
|
|
title: ToolExecutionStep
|
|
description: 'A tool execution step in an agent turn.
|
|
|
|
|
|
:param tool_calls: The tool calls to execute.
|
|
|
|
:param tool_responses: The tool responses from the tool calls.'
|
|
ToolPromptFormat:
|
|
type: string
|
|
enum:
|
|
- json
|
|
- function_tag
|
|
- python_list
|
|
title: ToolPromptFormat
|
|
description: "Prompt format for calling custom / zero shot tools.\n\n:cvar json:\
|
|
\ JSON format for calling tools. It takes the form:\n {\n \"type\"\
|
|
: \"function\",\n \"function\" : {\n \"name\": \"function_name\"\
|
|
,\n \"description\": \"function_description\",\n \"\
|
|
parameters\": {...}\n }\n }\n:cvar function_tag: Function tag format,\
|
|
\ pseudo-XML. This looks like:\n <function=function_name>(parameters)</function>\n\
|
|
\n:cvar python_list: Python list. The output is a valid Python expression\
|
|
\ that can be\n evaluated to a list. Each element in the list is a function\
|
|
\ call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1,\
|
|
\ param2)\"]"
|
|
ToolResponse-Input:
|
|
properties:
|
|
call_id:
|
|
type: string
|
|
title: Call Id
|
|
tool_name:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/BuiltinTool'
|
|
- type: string
|
|
title: Tool Name
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
metadata:
|
|
title: Metadata
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
required:
|
|
- call_id
|
|
- tool_name
|
|
- content
|
|
title: ToolResponse
|
|
description: 'Response from a tool invocation.
|
|
|
|
|
|
:param call_id: Unique identifier for the tool call this response is for
|
|
|
|
:param tool_name: Name of the tool that was invoked
|
|
|
|
:param content: The response content from the tool
|
|
|
|
:param metadata: (Optional) Additional metadata about the tool response'
|
|
ToolResponse-Output:
|
|
properties:
|
|
call_id:
|
|
type: string
|
|
title: Call Id
|
|
tool_name:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/BuiltinTool'
|
|
- type: string
|
|
title: Tool Name
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
metadata:
|
|
title: Metadata
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
required:
|
|
- call_id
|
|
- tool_name
|
|
- content
|
|
title: ToolResponse
|
|
description: 'Response from a tool invocation.
|
|
|
|
|
|
:param call_id: Unique identifier for the tool call this response is for
|
|
|
|
:param tool_name: Name of the tool that was invoked
|
|
|
|
:param content: The response content from the tool
|
|
|
|
:param metadata: (Optional) Additional metadata about the tool response'
|
|
ToolResponseMessage-Output:
|
|
properties:
|
|
role:
|
|
type: string
|
|
const: tool
|
|
title: Role
|
|
default: tool
|
|
call_id:
|
|
type: string
|
|
title: Call Id
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
type: object
|
|
required:
|
|
- call_id
|
|
- content
|
|
title: ToolResponseMessage
|
|
description: 'A message representing the result of a tool invocation.
|
|
|
|
|
|
:param role: Must be "tool" to identify this as a tool response
|
|
|
|
:param call_id: Unique identifier for the tool call this response is for
|
|
|
|
:param content: The response content from the tool'
|
|
TopKSamplingStrategy:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: top_k
|
|
title: Type
|
|
default: top_k
|
|
top_k:
|
|
type: integer
|
|
minimum: 1.0
|
|
title: Top K
|
|
type: object
|
|
required:
|
|
- top_k
|
|
title: TopKSamplingStrategy
|
|
description: 'Top-k sampling strategy that restricts sampling to the k most
|
|
likely tokens.
|
|
|
|
|
|
:param type: Must be "top_k" to identify this sampling strategy
|
|
|
|
:param top_k: Number of top tokens to consider for sampling. Must be at least
|
|
1'
|
|
TopPSamplingStrategy:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: top_p
|
|
title: Type
|
|
default: top_p
|
|
temperature:
|
|
title: Temperature
|
|
type: number
|
|
minimum: 0.0
|
|
top_p:
|
|
title: Top P
|
|
default: 0.95
|
|
type: number
|
|
type: object
|
|
required:
|
|
- temperature
|
|
title: TopPSamplingStrategy
|
|
description: 'Top-p (nucleus) sampling strategy that samples from the smallest
|
|
set of tokens with cumulative probability >= p.
|
|
|
|
|
|
:param type: Must be "top_p" to identify this sampling strategy
|
|
|
|
:param temperature: Controls randomness in sampling. Higher values increase
|
|
randomness
|
|
|
|
:param top_p: Cumulative probability threshold for nucleus sampling. Defaults
|
|
to 0.95'
|
|
TrainingConfig:
|
|
properties:
|
|
n_epochs:
|
|
type: integer
|
|
title: N Epochs
|
|
max_steps_per_epoch:
|
|
type: integer
|
|
title: Max Steps Per Epoch
|
|
default: 1
|
|
gradient_accumulation_steps:
|
|
type: integer
|
|
title: Gradient Accumulation Steps
|
|
default: 1
|
|
max_validation_steps:
|
|
title: Max Validation Steps
|
|
default: 1
|
|
type: integer
|
|
data_config:
|
|
$ref: '#/components/schemas/DataConfig'
|
|
optimizer_config:
|
|
$ref: '#/components/schemas/OptimizerConfig'
|
|
efficiency_config:
|
|
$ref: '#/components/schemas/EfficiencyConfig'
|
|
dtype:
|
|
title: Dtype
|
|
default: bf16
|
|
type: string
|
|
type: object
|
|
required:
|
|
- n_epochs
|
|
title: TrainingConfig
|
|
description: 'Comprehensive configuration for the training process.
|
|
|
|
|
|
:param n_epochs: Number of training epochs to run
|
|
|
|
:param max_steps_per_epoch: Maximum number of steps to run per epoch
|
|
|
|
:param gradient_accumulation_steps: Number of steps to accumulate gradients
|
|
before updating
|
|
|
|
:param max_validation_steps: (Optional) Maximum number of validation steps
|
|
per epoch
|
|
|
|
:param data_config: (Optional) Configuration for data loading and formatting
|
|
|
|
:param optimizer_config: (Optional) Configuration for the optimization algorithm
|
|
|
|
:param efficiency_config: (Optional) Configuration for memory and compute
|
|
optimizations
|
|
|
|
:param dtype: (Optional) Data type for model parameters (bf16, fp16, fp32)'
|
|
Turn:
|
|
properties:
|
|
turn_id:
|
|
type: string
|
|
title: Turn Id
|
|
session_id:
|
|
type: string
|
|
title: Session Id
|
|
input_messages:
|
|
items:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/UserMessage-Output'
|
|
- $ref: '#/components/schemas/ToolResponseMessage-Output'
|
|
type: array
|
|
title: Input Messages
|
|
steps:
|
|
items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/InferenceStep-Output'
|
|
- $ref: '#/components/schemas/ToolExecutionStep-Output'
|
|
- $ref: '#/components/schemas/ShieldCallStep-Output'
|
|
- $ref: '#/components/schemas/MemoryRetrievalStep-Output'
|
|
discriminator:
|
|
propertyName: step_type
|
|
mapping:
|
|
inference: '#/components/schemas/InferenceStep-Output'
|
|
memory_retrieval: '#/components/schemas/MemoryRetrievalStep-Output'
|
|
shield_call: '#/components/schemas/ShieldCallStep-Output'
|
|
tool_execution: '#/components/schemas/ToolExecutionStep-Output'
|
|
type: array
|
|
title: Steps
|
|
output_message:
|
|
$ref: '#/components/schemas/CompletionMessage-Output'
|
|
output_attachments:
|
|
title: Output Attachments
|
|
items:
|
|
$ref: '#/components/schemas/Attachment-Output'
|
|
type: array
|
|
started_at:
|
|
type: string
|
|
format: date-time
|
|
title: Started At
|
|
completed_at:
|
|
title: Completed At
|
|
type: string
|
|
format: date-time
|
|
type: object
|
|
required:
|
|
- turn_id
|
|
- session_id
|
|
- input_messages
|
|
- steps
|
|
- output_message
|
|
- started_at
|
|
title: Turn
|
|
description: 'A single turn in an interaction with an Agentic System.
|
|
|
|
|
|
:param turn_id: Unique identifier for the turn within a session
|
|
|
|
:param session_id: Unique identifier for the conversation session
|
|
|
|
:param input_messages: List of messages that initiated this turn
|
|
|
|
:param steps: Ordered list of processing steps executed during this turn
|
|
|
|
:param output_message: The model''s generated response containing content
|
|
and metadata
|
|
|
|
:param output_attachments: (Optional) Files or media attached to the agent''s
|
|
response
|
|
|
|
:param started_at: Timestamp when the turn began
|
|
|
|
:param completed_at: (Optional) Timestamp when the turn finished, if completed'
|
|
URIDataSource:
|
|
properties:
|
|
type:
|
|
type: string
|
|
const: uri
|
|
title: Type
|
|
default: uri
|
|
uri:
|
|
type: string
|
|
title: Uri
|
|
type: object
|
|
required:
|
|
- uri
|
|
title: URIDataSource
|
|
description: "A dataset that can be obtained from a URI.\n:param uri: The dataset\
|
|
\ can be obtained from a URI. E.g.\n - \"https://mywebsite.com/mydata.jsonl\"\
|
|
\n - \"lsfs://mydata.jsonl\"\n - \"data:csv;base64,{base64_content}\""
|
|
URL:
|
|
properties:
|
|
uri:
|
|
type: string
|
|
title: Uri
|
|
type: object
|
|
required:
|
|
- uri
|
|
title: URL
|
|
description: 'A URL reference to external content.
|
|
|
|
|
|
:param uri: The URL string pointing to the resource'
|
|
UserMessage-Input:
|
|
properties:
|
|
role:
|
|
type: string
|
|
const: user
|
|
title: Role
|
|
default: user
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
context:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Input'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Input'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Context
|
|
type: object
|
|
required:
|
|
- content
|
|
title: UserMessage
|
|
description: 'A message from the user in a chat conversation.
|
|
|
|
|
|
:param role: Must be "user" to identify this as a user message
|
|
|
|
:param content: The content of the message, which can include text and other
|
|
media
|
|
|
|
:param context: (Optional) This field is used internally by Llama Stack to
|
|
pass RAG context. This field may be removed in the API in the future.'
|
|
UserMessage-Output:
|
|
properties:
|
|
role:
|
|
type: string
|
|
const: user
|
|
title: Role
|
|
default: user
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
context:
|
|
anyOf:
|
|
- type: string
|
|
- oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem-Output'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
discriminator:
|
|
propertyName: type
|
|
mapping:
|
|
image: '#/components/schemas/ImageContentItem-Output'
|
|
text: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Context
|
|
type: object
|
|
required:
|
|
- content
|
|
title: UserMessage
|
|
description: 'A message from the user in a chat conversation.
|
|
|
|
|
|
:param role: Must be "user" to identify this as a user message
|
|
|
|
:param content: The content of the message, which can include text and other
|
|
media
|
|
|
|
:param context: (Optional) This field is used internally by Llama Stack to
|
|
pass RAG context. This field may be removed in the API in the future.'
|
|
ViolationLevel:
|
|
type: string
|
|
enum:
|
|
- info
|
|
- warn
|
|
- error
|
|
title: ViolationLevel
|
|
description: 'Severity level of a safety violation.
|
|
|
|
|
|
:cvar INFO: Informational level violation that does not require action
|
|
|
|
:cvar WARN: Warning level violation that suggests caution but allows continuation
|
|
|
|
:cvar ERROR: Error level violation that requires blocking or intervention'
|
|
_URLOrData:
|
|
properties:
|
|
url:
|
|
$ref: '#/components/schemas/URL'
|
|
data:
|
|
contentEncoding: base64
|
|
title: Data
|
|
type: string
|
|
type: object
|
|
title: _URLOrData
|
|
description: 'A URL or a base64 encoded string
|
|
|
|
|
|
:param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
Note that URL could have length limits.
|
|
|
|
:param data: base64 encoded image data as string'
|
|
__main_____agents_agent_id_session_Request:
|
|
properties:
|
|
agent_id:
|
|
type: string
|
|
title: Agent Id
|
|
session_name:
|
|
type: string
|
|
title: Session Name
|
|
type: object
|
|
required:
|
|
- agent_id
|
|
- session_name
|
|
title: _agents_agent_id_session_Request
|
|
__main_____agents_agent_id_session_session_id_turn_Request:
|
|
properties:
|
|
agent_id:
|
|
type: string
|
|
title: Agent Id
|
|
session_id:
|
|
type: string
|
|
title: Session Id
|
|
messages:
|
|
$ref: '#/components/schemas/UserMessage-Input'
|
|
stream:
|
|
type: boolean
|
|
title: Stream
|
|
default: false
|
|
documents:
|
|
$ref: '#/components/schemas/Document'
|
|
toolgroups:
|
|
anyOf:
|
|
- type: string
|
|
- $ref: '#/components/schemas/AgentToolGroupWithArgs'
|
|
title: Toolgroups
|
|
tool_config:
|
|
$ref: '#/components/schemas/ToolConfig'
|
|
type: object
|
|
required:
|
|
- agent_id
|
|
- session_id
|
|
- messages
|
|
- documents
|
|
- toolgroups
|
|
- tool_config
|
|
title: _agents_agent_id_session_session_id_turn_Request
|
|
__main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request:
|
|
properties:
|
|
agent_id:
|
|
type: string
|
|
title: Agent Id
|
|
session_id:
|
|
type: string
|
|
title: Session Id
|
|
turn_id:
|
|
type: string
|
|
title: Turn Id
|
|
tool_responses:
|
|
$ref: '#/components/schemas/ToolResponse-Input'
|
|
stream:
|
|
type: boolean
|
|
title: Stream
|
|
default: false
|
|
type: object
|
|
required:
|
|
- agent_id
|
|
- session_id
|
|
- turn_id
|
|
- tool_responses
|
|
title: _agents_agent_id_session_session_id_turn_turn_id_resume_Request
|
|
__main_____datasets_Request:
|
|
properties:
|
|
purpose:
|
|
$ref: '#/components/schemas/DatasetPurpose'
|
|
metadata:
|
|
type: string
|
|
title: Metadata
|
|
dataset_id:
|
|
type: string
|
|
title: Dataset Id
|
|
type: object
|
|
required:
|
|
- purpose
|
|
- metadata
|
|
- dataset_id
|
|
title: _datasets_Request
|
|
_inference_rerank_Request:
|
|
properties:
|
|
model:
|
|
type: string
|
|
title: Model
|
|
query:
|
|
type: string
|
|
title: Query
|
|
items:
|
|
type: string
|
|
title: Items
|
|
max_num_results:
|
|
type: integer
|
|
title: Max Num Results
|
|
type: object
|
|
required:
|
|
- model
|
|
- query
|
|
- items
|
|
- max_num_results
|
|
title: _inference_rerank_Request
|
|
Error:
|
|
description: 'Error response from the API. Roughly follows RFC 7807.
|
|
|
|
|
|
:param status: HTTP status code
|
|
|
|
:param title: Error title, a short summary of the error which is invariant
|
|
for an error type
|
|
|
|
:param detail: Error detail, a longer human-readable description of the error
|
|
|
|
:param instance: (Optional) A URL which can be used to retrieve more information
|
|
about the specific occurrence of the error'
|
|
properties:
|
|
status:
|
|
title: Status
|
|
type: integer
|
|
title:
|
|
title: Title
|
|
type: string
|
|
detail:
|
|
title: Detail
|
|
type: string
|
|
instance:
|
|
title: Instance
|
|
type: string
|
|
nullable: true
|
|
required:
|
|
- status
|
|
- title
|
|
- detail
|
|
title: Error
|
|
type: object
|
|
Agent:
|
|
description: 'An agent instance with configuration and metadata.
|
|
|
|
|
|
:param agent_id: Unique identifier for the agent
|
|
|
|
:param agent_config: Configuration settings for the agent
|
|
|
|
:param created_at: Timestamp when the agent was created'
|
|
properties:
|
|
agent_id:
|
|
title: Agent Id
|
|
type: string
|
|
agent_config:
|
|
$ref: '#/components/schemas/AgentConfig'
|
|
created_at:
|
|
format: date-time
|
|
title: Created At
|
|
type: string
|
|
required:
|
|
- agent_id
|
|
- agent_config
|
|
- created_at
|
|
title: Agent
|
|
type: object
|
|
AgentStepResponse:
|
|
description: 'Response containing details of a specific agent step.
|
|
|
|
|
|
:param step: The complete step data and execution details'
|
|
properties:
|
|
step:
|
|
discriminator:
|
|
mapping:
|
|
inference: '#/$defs/InferenceStep'
|
|
memory_retrieval: '#/$defs/MemoryRetrievalStep'
|
|
shield_call: '#/$defs/ShieldCallStep'
|
|
tool_execution: '#/$defs/ToolExecutionStep'
|
|
propertyName: step_type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/InferenceStep'
|
|
- $ref: '#/components/schemas/ToolExecutionStep'
|
|
- $ref: '#/components/schemas/ShieldCallStep'
|
|
- $ref: '#/components/schemas/MemoryRetrievalStep'
|
|
title: Step
|
|
required:
|
|
- step
|
|
title: AgentStepResponse
|
|
type: object
|
|
CompletionMessage:
|
|
description: "A message containing the model's (assistant) response in a chat\
|
|
\ conversation.\n\n:param role: Must be \"assistant\" to identify this as\
|
|
\ the model's response\n:param content: The content of the model's response\n\
|
|
:param stop_reason: Reason why the model stopped generating. Options are:\n\
|
|
\ - `StopReason.end_of_turn`: The model finished generating the entire\
|
|
\ response.\n - `StopReason.end_of_message`: The model finished generating\
|
|
\ but generated a partial response -- usually, a tool call. The user may call\
|
|
\ the tool and continue the conversation with the tool's response.\n -\
|
|
\ `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls:\
|
|
\ List of tool calls. Each tool call is a ToolCall object."
|
|
properties:
|
|
role:
|
|
const: assistant
|
|
default: assistant
|
|
title: Role
|
|
type: string
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- discriminator:
|
|
mapping:
|
|
image: '#/$defs/ImageContentItem'
|
|
text: '#/$defs/TextContentItem'
|
|
propertyName: type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
discriminator:
|
|
mapping:
|
|
image: '#/$defs/ImageContentItem'
|
|
text: '#/$defs/TextContentItem'
|
|
propertyName: type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
stop_reason:
|
|
$ref: '#/components/schemas/StopReason'
|
|
tool_calls:
|
|
title: Tool Calls
|
|
items:
|
|
$ref: '#/components/schemas/ToolCall'
|
|
type: array
|
|
required:
|
|
- content
|
|
- stop_reason
|
|
title: CompletionMessage
|
|
type: object
|
|
InferenceStep:
|
|
description: 'An inference step in an agent turn.
|
|
|
|
|
|
:param model_response: The response from the LLM.'
|
|
properties:
|
|
turn_id:
|
|
title: Turn Id
|
|
type: string
|
|
step_id:
|
|
title: Step Id
|
|
type: string
|
|
started_at:
|
|
title: Started At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
completed_at:
|
|
title: Completed At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
step_type:
|
|
const: inference
|
|
default: inference
|
|
title: Step Type
|
|
type: string
|
|
model_response:
|
|
$ref: '#/components/schemas/CompletionMessage'
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- model_response
|
|
title: InferenceStep
|
|
type: object
|
|
MemoryRetrievalStep:
|
|
description: 'A memory retrieval step in an agent turn.
|
|
|
|
|
|
:param vector_store_ids: The IDs of the vector databases to retrieve context
|
|
from.
|
|
|
|
:param inserted_context: The context retrieved from the vector databases.'
|
|
properties:
|
|
turn_id:
|
|
title: Turn Id
|
|
type: string
|
|
step_id:
|
|
title: Step Id
|
|
type: string
|
|
started_at:
|
|
title: Started At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
completed_at:
|
|
title: Completed At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
step_type:
|
|
const: memory_retrieval
|
|
default: memory_retrieval
|
|
title: Step Type
|
|
type: string
|
|
vector_store_ids:
|
|
title: Vector Store Ids
|
|
type: string
|
|
inserted_context:
|
|
anyOf:
|
|
- type: string
|
|
- discriminator:
|
|
mapping:
|
|
image: '#/$defs/ImageContentItem'
|
|
text: '#/$defs/TextContentItem'
|
|
propertyName: type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
discriminator:
|
|
mapping:
|
|
image: '#/$defs/ImageContentItem'
|
|
text: '#/$defs/TextContentItem'
|
|
propertyName: type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Inserted Context
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- vector_store_ids
|
|
- inserted_context
|
|
title: MemoryRetrievalStep
|
|
type: object
|
|
PaginatedResponse:
|
|
description: 'A generic paginated response that follows a simple format.
|
|
|
|
|
|
:param data: The list of items for the current page
|
|
|
|
:param has_more: Whether there are more items available after this set
|
|
|
|
:param url: The URL for accessing this list'
|
|
properties:
|
|
data:
|
|
items:
|
|
additionalProperties: true
|
|
type: object
|
|
title: Data
|
|
type: array
|
|
has_more:
|
|
title: Has More
|
|
type: boolean
|
|
url:
|
|
title: Url
|
|
type: string
|
|
nullable: true
|
|
required:
|
|
- data
|
|
- has_more
|
|
title: PaginatedResponse
|
|
type: object
|
|
Session:
|
|
description: 'A single session of an interaction with an Agentic System.
|
|
|
|
|
|
:param session_id: Unique identifier for the conversation session
|
|
|
|
:param session_name: Human-readable name for the session
|
|
|
|
:param turns: List of all turns that have occurred in this session
|
|
|
|
:param started_at: Timestamp when the session was created'
|
|
properties:
|
|
session_id:
|
|
title: Session Id
|
|
type: string
|
|
session_name:
|
|
title: Session Name
|
|
type: string
|
|
turns:
|
|
items:
|
|
$ref: '#/components/schemas/Turn'
|
|
title: Turns
|
|
type: array
|
|
started_at:
|
|
format: date-time
|
|
title: Started At
|
|
type: string
|
|
required:
|
|
- session_id
|
|
- session_name
|
|
- turns
|
|
- started_at
|
|
title: Session
|
|
type: object
|
|
ShieldCallStep:
|
|
description: 'A shield call step in an agent turn.
|
|
|
|
|
|
:param violation: The violation from the shield call.'
|
|
properties:
|
|
turn_id:
|
|
title: Turn Id
|
|
type: string
|
|
step_id:
|
|
title: Step Id
|
|
type: string
|
|
started_at:
|
|
title: Started At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
completed_at:
|
|
title: Completed At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
step_type:
|
|
const: shield_call
|
|
default: shield_call
|
|
title: Step Type
|
|
type: string
|
|
violation:
|
|
$ref: '#/components/schemas/SafetyViolation'
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- violation
|
|
title: ShieldCallStep
|
|
type: object
|
|
ToolExecutionStep:
|
|
description: 'A tool execution step in an agent turn.
|
|
|
|
|
|
:param tool_calls: The tool calls to execute.
|
|
|
|
:param tool_responses: The tool responses from the tool calls.'
|
|
properties:
|
|
turn_id:
|
|
title: Turn Id
|
|
type: string
|
|
step_id:
|
|
title: Step Id
|
|
type: string
|
|
started_at:
|
|
title: Started At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
completed_at:
|
|
title: Completed At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
step_type:
|
|
const: tool_execution
|
|
default: tool_execution
|
|
title: Step Type
|
|
type: string
|
|
tool_calls:
|
|
items:
|
|
$ref: '#/components/schemas/ToolCall'
|
|
title: Tool Calls
|
|
type: array
|
|
tool_responses:
|
|
items:
|
|
$ref: '#/components/schemas/ToolResponse'
|
|
title: Tool Responses
|
|
type: array
|
|
required:
|
|
- turn_id
|
|
- step_id
|
|
- tool_calls
|
|
- tool_responses
|
|
title: ToolExecutionStep
|
|
type: object
|
|
ToolResponse:
|
|
description: 'Response from a tool invocation.
|
|
|
|
|
|
:param call_id: Unique identifier for the tool call this response is for
|
|
|
|
:param tool_name: Name of the tool that was invoked
|
|
|
|
:param content: The response content from the tool
|
|
|
|
:param metadata: (Optional) Additional metadata about the tool response'
|
|
properties:
|
|
call_id:
|
|
title: Call Id
|
|
type: string
|
|
tool_name:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/BuiltinTool'
|
|
- type: string
|
|
title: Tool Name
|
|
content:
|
|
anyOf:
|
|
- type: string
|
|
- discriminator:
|
|
mapping:
|
|
image: '#/$defs/ImageContentItem'
|
|
text: '#/$defs/TextContentItem'
|
|
propertyName: type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
- items:
|
|
discriminator:
|
|
mapping:
|
|
image: '#/$defs/ImageContentItem'
|
|
text: '#/$defs/TextContentItem'
|
|
propertyName: type
|
|
oneOf:
|
|
- $ref: '#/components/schemas/ImageContentItem'
|
|
- $ref: '#/components/schemas/TextContentItem'
|
|
type: array
|
|
title: Content
|
|
metadata:
|
|
title: Metadata
|
|
additionalProperties: true
|
|
type: object
|
|
nullable: true
|
|
required:
|
|
- call_id
|
|
- tool_name
|
|
- content
|
|
title: ToolResponse
|
|
type: object
|
|
Checkpoint:
|
|
description: 'Checkpoint created during training runs.
|
|
|
|
|
|
:param identifier: Unique identifier for the checkpoint
|
|
|
|
:param created_at: Timestamp when the checkpoint was created
|
|
|
|
:param epoch: Training epoch when the checkpoint was saved
|
|
|
|
:param post_training_job_id: Identifier of the training job that created this
|
|
checkpoint
|
|
|
|
:param path: File system path where the checkpoint is stored
|
|
|
|
:param training_metrics: (Optional) Training metrics associated with this
|
|
checkpoint'
|
|
properties:
|
|
identifier:
|
|
title: Identifier
|
|
type: string
|
|
created_at:
|
|
format: date-time
|
|
title: Created At
|
|
type: string
|
|
epoch:
|
|
title: Epoch
|
|
type: integer
|
|
post_training_job_id:
|
|
title: Post Training Job Id
|
|
type: string
|
|
path:
|
|
title: Path
|
|
type: string
|
|
training_metrics:
|
|
$ref: '#/components/schemas/PostTrainingMetric'
|
|
nullable: true
|
|
required:
|
|
- identifier
|
|
- created_at
|
|
- epoch
|
|
- post_training_job_id
|
|
- path
|
|
title: Checkpoint
|
|
type: object
|
|
PostTrainingJobArtifactsResponse:
|
|
description: 'Artifacts of a finetuning job.
|
|
|
|
|
|
:param job_uuid: Unique identifier for the training job
|
|
|
|
:param checkpoints: List of model checkpoints created during training'
|
|
properties:
|
|
job_uuid:
|
|
title: Job Uuid
|
|
type: string
|
|
checkpoints:
|
|
items:
|
|
$ref: '#/components/schemas/Checkpoint'
|
|
title: Checkpoints
|
|
type: array
|
|
required:
|
|
- job_uuid
|
|
title: PostTrainingJobArtifactsResponse
|
|
type: object
|
|
PostTrainingJobStatusResponse:
|
|
description: 'Status of a finetuning job.
|
|
|
|
|
|
:param job_uuid: Unique identifier for the training job
|
|
|
|
:param status: Current status of the training job
|
|
|
|
:param scheduled_at: (Optional) Timestamp when the job was scheduled
|
|
|
|
:param started_at: (Optional) Timestamp when the job execution began
|
|
|
|
:param completed_at: (Optional) Timestamp when the job finished, if completed
|
|
|
|
:param resources_allocated: (Optional) Information about computational resources
|
|
allocated to the job
|
|
|
|
:param checkpoints: List of model checkpoints created during training'
|
|
properties:
|
|
job_uuid:
|
|
title: Job Uuid
|
|
type: string
|
|
status:
|
|
$ref: '#/components/schemas/JobStatus'
|
|
scheduled_at:
|
|
title: Scheduled At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
started_at:
|
|
title: Started At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
completed_at:
|
|
title: Completed At
|
|
format: date-time
|
|
type: string
|
|
nullable: true
|
|
resources_allocated:
|
|
title: Resources Allocated
|
|
additionalProperties: true
|
|
type: object
|
|
nullable: true
|
|
checkpoints:
|
|
items:
|
|
$ref: '#/components/schemas/Checkpoint'
|
|
title: Checkpoints
|
|
type: array
|
|
required:
|
|
- job_uuid
|
|
- status
|
|
title: PostTrainingJobStatusResponse
|
|
type: object
|
|
ImageContentItem:
|
|
description: 'A image content item
|
|
|
|
|
|
:param type: Discriminator type of the content item. Always "image"
|
|
|
|
:param image: Image as a base64 encoded string or an URL'
|
|
properties:
|
|
type:
|
|
const: image
|
|
default: image
|
|
title: Type
|
|
type: string
|
|
image:
|
|
$ref: '#/components/schemas/_URLOrData'
|
|
required:
|
|
- image
|
|
title: ImageContentItem
|
|
type: object
|
|
PostTrainingMetric:
|
|
description: 'Training metrics captured during post-training jobs.
|
|
|
|
|
|
:param epoch: Training epoch number
|
|
|
|
:param train_loss: Loss value on the training dataset
|
|
|
|
:param validation_loss: Loss value on the validation dataset
|
|
|
|
:param perplexity: Perplexity metric indicating model confidence'
|
|
properties:
|
|
epoch:
|
|
title: Epoch
|
|
type: integer
|
|
train_loss:
|
|
title: Train Loss
|
|
type: number
|
|
validation_loss:
|
|
title: Validation Loss
|
|
type: number
|
|
perplexity:
|
|
title: Perplexity
|
|
type: number
|
|
required:
|
|
- epoch
|
|
- train_loss
|
|
- validation_loss
|
|
- perplexity
|
|
title: PostTrainingMetric
|
|
type: object
|
|
responses:
|
|
BadRequest400:
|
|
description: The request was invalid or malformed
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
status: 400
|
|
title: Bad Request
|
|
detail: The request was invalid or malformed
|
|
TooManyRequests429:
|
|
description: The client has sent too many requests in a given amount of time
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
status: 429
|
|
title: Too Many Requests
|
|
detail: You have exceeded the rate limit. Please try again later.
|
|
InternalServerError500:
|
|
description: The server encountered an unexpected error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Error'
|
|
example:
|
|
status: 500
|
|
title: Internal Server Error
|
|
detail: An unexpected error occurred
|
|
DefaultError:
|
|
description: An error occurred
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Error'
|