mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-28 01:41:59 +00:00
refactor(api): rename "files" API to "artifacts"
The term "artifacts" better represents the purpose of this API, which handles outputs generated by API executions, eventually stored objects that can be of served by any storage interface (file, objects). This aligns better with the industry convention of 'artifacts' (build outputs, process results) rather than generic 'files'. 'files' would be appropriate if the goal was to store and retrieve files purely. Additionally, in our context, artifact is a better term since it will handle: * Data produced by SDG (Synthetic Data Generation) - as input * Output of a trained model - as output Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
parent
a5d14749a5
commit
fb3c9be1fd
10 changed files with 479 additions and 567 deletions
302
docs/_static/llama-stack-spec.yaml
vendored
302
docs/_static/llama-stack-spec.yaml
vendored
|
|
@ -98,6 +98,32 @@ paths:
|
|||
schema:
|
||||
$ref: '#/components/schemas/BatchCompletionRequest'
|
||||
required: true
|
||||
/v1/artifacts/bulk:
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
'429':
|
||||
$ref: >-
|
||||
#/components/responses/TooManyRequests429
|
||||
'500':
|
||||
$ref: >-
|
||||
#/components/responses/InternalServerError500
|
||||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Artifacts
|
||||
description: >-
|
||||
Delete multiple artifacts in a single request.
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BulkDeleteArtifactsRequest'
|
||||
required: true
|
||||
/v1/post-training/job/cancel:
|
||||
post:
|
||||
responses:
|
||||
|
|
@ -375,7 +401,7 @@ paths:
|
|||
schema:
|
||||
$ref: '#/components/schemas/CreateOpenaiResponseRequest'
|
||||
required: true
|
||||
/v1/files:
|
||||
/v1/artifacts:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
|
|
@ -383,7 +409,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ListBucketResponse'
|
||||
$ref: '#/components/schemas/PaginatedResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
'429':
|
||||
|
|
@ -395,14 +421,21 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
description: List all buckets.
|
||||
- Artifacts
|
||||
description: List all artifacts with pagination.
|
||||
parameters:
|
||||
- name: bucket
|
||||
- name: start_index
|
||||
in: query
|
||||
required: true
|
||||
description: Start index of the artifacts to list
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
type: integer
|
||||
- name: limit
|
||||
in: query
|
||||
description: Number of artifacts to list
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
|
|
@ -410,7 +443,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FileUploadResponse'
|
||||
$ref: '#/components/schemas/ArtifactUploadResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
'429':
|
||||
|
|
@ -422,9 +455,9 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
- Artifacts
|
||||
description: >-
|
||||
Create a new upload session for a file identified by a bucket and key.
|
||||
Create a new upload session for an artifact identified by a key.
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
|
|
@ -563,7 +596,7 @@ paths:
|
|||
required: true
|
||||
schema:
|
||||
type: string
|
||||
/v1/files/{bucket}/{key}:
|
||||
/v1/artifacts/{key}:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
|
|
@ -571,7 +604,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FileResponse'
|
||||
$ref: '#/components/schemas/ArtifactResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
'429':
|
||||
|
|
@ -583,20 +616,14 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
- Artifacts
|
||||
description: >-
|
||||
Get a file info identified by a bucket and key.
|
||||
Get an artifact info identified by a key.
|
||||
parameters:
|
||||
- name: bucket
|
||||
in: path
|
||||
description: 'Bucket name (valid chars: a-zA-Z0-9_-)'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: key
|
||||
in: path
|
||||
description: >-
|
||||
Key under which the file is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
Key under which the artifact is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
|
@ -615,20 +642,13 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
description: >-
|
||||
Delete a file identified by a bucket and key.
|
||||
- Artifacts
|
||||
description: Delete an artifact identified by a key.
|
||||
parameters:
|
||||
- name: bucket
|
||||
in: path
|
||||
description: 'Bucket name (valid chars: a-zA-Z0-9_-)'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: key
|
||||
in: path
|
||||
description: >-
|
||||
Key under which the file is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
Key under which the artifact is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
|
|
@ -1261,7 +1281,7 @@ paths:
|
|||
- PostTraining (Coming Soon)
|
||||
description: ''
|
||||
parameters: []
|
||||
/v1/files/session:{upload_id}:
|
||||
/v1/artifacts/sessions/{upload_id}:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
|
|
@ -1269,7 +1289,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FileUploadResponse'
|
||||
$ref: '#/components/schemas/ArtifactUploadResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
'429':
|
||||
|
|
@ -1281,9 +1301,9 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
- Artifacts
|
||||
description: >-
|
||||
Returns information about an existsing upload session
|
||||
Returns information about an existing upload session
|
||||
parameters:
|
||||
- name: upload_id
|
||||
in: path
|
||||
|
|
@ -1299,7 +1319,7 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/FileResponse'
|
||||
- $ref: '#/components/schemas/ArtifactResponse'
|
||||
- type: 'null'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
|
|
@ -1312,9 +1332,9 @@ paths:
|
|||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
- Artifacts
|
||||
description: >-
|
||||
Upload file content to an existing upload session. On the server, request
|
||||
Upload artifact content to an existing upload session. On the server, request
|
||||
body will have the raw bytes that are uploaded.
|
||||
parameters:
|
||||
- name: upload_id
|
||||
|
|
@ -1812,35 +1832,6 @@ paths:
|
|||
schema:
|
||||
$ref: '#/components/schemas/RegisterDatasetRequest'
|
||||
required: true
|
||||
/v1/files/{bucket}:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ListFileResponse'
|
||||
'400':
|
||||
$ref: '#/components/responses/BadRequest400'
|
||||
'429':
|
||||
$ref: >-
|
||||
#/components/responses/TooManyRequests429
|
||||
'500':
|
||||
$ref: >-
|
||||
#/components/responses/InternalServerError500
|
||||
default:
|
||||
$ref: '#/components/responses/DefaultError'
|
||||
tags:
|
||||
- Files
|
||||
description: List all files in a bucket.
|
||||
parameters:
|
||||
- name: bucket
|
||||
in: path
|
||||
description: 'Bucket name (valid chars: a-zA-Z0-9_-)'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
/v1/models:
|
||||
get:
|
||||
responses:
|
||||
|
|
@ -3489,6 +3480,44 @@ components:
|
|||
- stop_reason
|
||||
title: CompletionResponse
|
||||
description: Response from a completion request.
|
||||
ArtifactDeleteRequest:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: >-
|
||||
Key under which the artifact is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
additionalProperties: false
|
||||
required:
|
||||
- key
|
||||
title: ArtifactDeleteRequest
|
||||
description: >-
|
||||
Request model for deleting a single artifact.
|
||||
BulkDeleteRequest:
|
||||
type: object
|
||||
properties:
|
||||
artifacts:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ArtifactDeleteRequest'
|
||||
description: List of artifacts to delete
|
||||
additionalProperties: false
|
||||
required:
|
||||
- artifacts
|
||||
title: BulkDeleteRequest
|
||||
description: >-
|
||||
Request model for bulk deletion of artifacts.
|
||||
BulkDeleteArtifactsRequest:
|
||||
type: object
|
||||
properties:
|
||||
request:
|
||||
$ref: '#/components/schemas/BulkDeleteRequest'
|
||||
description: >-
|
||||
Bulk delete request containing list of artifacts to delete
|
||||
additionalProperties: false
|
||||
required:
|
||||
- request
|
||||
title: BulkDeleteArtifactsRequest
|
||||
CancelTrainingJobRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -4826,36 +4855,32 @@ components:
|
|||
CreateUploadSessionRequest:
|
||||
type: object
|
||||
properties:
|
||||
bucket:
|
||||
type: string
|
||||
description: >-
|
||||
Bucket under which the file is stored (valid chars: a-zA-Z0-9_-)
|
||||
key:
|
||||
type: string
|
||||
description: >-
|
||||
Key under which the file is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
Key under which the artifact is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
mime_type:
|
||||
type: string
|
||||
description: MIME type of the file
|
||||
description: MIME type of the artifact
|
||||
size:
|
||||
type: integer
|
||||
description: File size in bytes
|
||||
description: Artifact size in bytes
|
||||
additionalProperties: false
|
||||
required:
|
||||
- bucket
|
||||
- key
|
||||
- mime_type
|
||||
- size
|
||||
title: CreateUploadSessionRequest
|
||||
FileUploadResponse:
|
||||
ArtifactUploadResponse:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: ID of the upload session
|
||||
url:
|
||||
uri:
|
||||
type: string
|
||||
description: Upload URL for the file or file parts
|
||||
description: >-
|
||||
Upload URI for the artifact or artifact parts
|
||||
offset:
|
||||
type: integer
|
||||
description: Upload content offset
|
||||
|
|
@ -4865,12 +4890,12 @@ components:
|
|||
additionalProperties: false
|
||||
required:
|
||||
- id
|
||||
- url
|
||||
- uri
|
||||
- offset
|
||||
- size
|
||||
title: FileUploadResponse
|
||||
title: ArtifactUploadResponse
|
||||
description: >-
|
||||
Response after initiating a file upload session.
|
||||
Response after initiating an artifact upload session.
|
||||
EmbeddingsRequest:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -5254,6 +5279,35 @@ components:
|
|||
required:
|
||||
- step
|
||||
title: AgentStepResponse
|
||||
ArtifactResponse:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: >-
|
||||
Key under which the artifact is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
mime_type:
|
||||
type: string
|
||||
description: MIME type of the artifact
|
||||
uri:
|
||||
type: string
|
||||
description: Upload URI for the artifact contents
|
||||
size:
|
||||
type: integer
|
||||
description: Size of the artifact in bytes
|
||||
created_at:
|
||||
type: integer
|
||||
description: >-
|
||||
Timestamp of when the artifact was created
|
||||
additionalProperties: false
|
||||
required:
|
||||
- key
|
||||
- mime_type
|
||||
- uri
|
||||
- size
|
||||
- created_at
|
||||
title: ArtifactResponse
|
||||
description: Response representing an artifact entry.
|
||||
Benchmark:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -5412,39 +5466,6 @@ components:
|
|||
title: URIDataSource
|
||||
description: >-
|
||||
A dataset that can be obtained from a URI.
|
||||
FileResponse:
|
||||
type: object
|
||||
properties:
|
||||
bucket:
|
||||
type: string
|
||||
description: >-
|
||||
Bucket under which the file is stored (valid chars: a-zA-Z0-9_-)
|
||||
key:
|
||||
type: string
|
||||
description: >-
|
||||
Key under which the file is stored (valid chars: a-zA-Z0-9_-/.)
|
||||
mime_type:
|
||||
type: string
|
||||
description: MIME type of the file
|
||||
url:
|
||||
type: string
|
||||
description: Upload URL for the file contents
|
||||
bytes:
|
||||
type: integer
|
||||
description: Size of the file in bytes
|
||||
created_at:
|
||||
type: integer
|
||||
description: Timestamp of when the file was created
|
||||
additionalProperties: false
|
||||
required:
|
||||
- bucket
|
||||
- key
|
||||
- mime_type
|
||||
- url
|
||||
- bytes
|
||||
- created_at
|
||||
title: FileResponse
|
||||
description: Response representing a file entry.
|
||||
Model:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -6235,17 +6256,7 @@ components:
|
|||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
additionalProperties:
|
||||
oneOf:
|
||||
- type: 'null'
|
||||
- type: boolean
|
||||
- type: number
|
||||
- type: string
|
||||
- type: array
|
||||
- type: object
|
||||
type: object
|
||||
description: The list of items for the current page
|
||||
has_more:
|
||||
type: boolean
|
||||
|
|
@ -6277,29 +6288,6 @@ components:
|
|||
- job_id
|
||||
- status
|
||||
title: Job
|
||||
BucketResponse:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
additionalProperties: false
|
||||
required:
|
||||
- name
|
||||
title: BucketResponse
|
||||
ListBucketResponse:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/BucketResponse'
|
||||
description: List of FileResponse entries
|
||||
additionalProperties: false
|
||||
required:
|
||||
- data
|
||||
title: ListBucketResponse
|
||||
description: >-
|
||||
Response representing a list of file entries.
|
||||
ListBenchmarksResponse:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -6322,20 +6310,6 @@ components:
|
|||
required:
|
||||
- data
|
||||
title: ListDatasetsResponse
|
||||
ListFileResponse:
|
||||
type: object
|
||||
properties:
|
||||
data:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/FileResponse'
|
||||
description: List of FileResponse entries
|
||||
additionalProperties: false
|
||||
required:
|
||||
- data
|
||||
title: ListFileResponse
|
||||
description: >-
|
||||
Response representing a list of file entries.
|
||||
ListModelsResponse:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -8561,6 +8535,7 @@ tags:
|
|||
the RAG Tool and Vector IO APIs for more details.
|
||||
x-displayName: >-
|
||||
Agents API for creating and interacting with agentic systems.
|
||||
- name: Artifacts
|
||||
- name: BatchInference (Coming Soon)
|
||||
description: >-
|
||||
This is an asynchronous API. If the request is successful, the response will
|
||||
|
|
@ -8579,7 +8554,6 @@ tags:
|
|||
- name: Eval
|
||||
x-displayName: >-
|
||||
Llama Stack Evaluation API for running evaluations on model and agent candidates.
|
||||
- name: Files
|
||||
- name: Inference
|
||||
description: >-
|
||||
This API provides the raw interface to the underlying models. Two kinds of models
|
||||
|
|
@ -8612,12 +8586,12 @@ x-tagGroups:
|
|||
- name: Operations
|
||||
tags:
|
||||
- Agents
|
||||
- Artifacts
|
||||
- BatchInference (Coming Soon)
|
||||
- Benchmarks
|
||||
- DatasetIO
|
||||
- Datasets
|
||||
- Eval
|
||||
- Files
|
||||
- Inference
|
||||
- Inspect
|
||||
- Models
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue