Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions docs/_static/llama-stack-spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
},
"tags": [
"DatasetIO"
"Datasets"
],
"description": "",
"parameters": [
Expand Down Expand Up @@ -524,7 +524,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "List all buckets.",
"parameters": [
Expand Down Expand Up @@ -564,7 +564,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "Create a new upload session for a file identified by a bucket and key.",
"parameters": [],
Expand Down Expand Up @@ -791,7 +791,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "Get a file info identified by a bucket and key.",
"parameters": [
Expand Down Expand Up @@ -841,7 +841,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "Delete a file identified by a bucket and key.",
"parameters": [
Expand Down Expand Up @@ -1830,7 +1830,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "Returns information about an existsing upload session",
"parameters": [
Expand Down Expand Up @@ -1878,7 +1878,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "Upload file content to an existing upload session. On the server, request body will have the raw bytes that are uploaded.",
"parameters": [
Expand Down Expand Up @@ -2204,7 +2204,7 @@
}
},
"tags": [
"DatasetIO"
"Datasets"
],
"description": "Get a paginated list of rows from a dataset. Uses cursor-based pagination.",
"parameters": [
Expand Down Expand Up @@ -2603,7 +2603,7 @@
}
},
"tags": [
"Files (Coming Soon)"
"Files"
],
"description": "List all files in a bucket.",
"parameters": [
Expand Down Expand Up @@ -10274,7 +10274,7 @@
"name": "Benchmarks"
},
{
"name": "DatasetIO"
"name": "Datasets"
},
{
"name": "Datasets"
Expand All @@ -10284,7 +10284,7 @@
"x-displayName": "Llama Stack Evaluation API for running evaluations on model and agent candidates."
},
{
"name": "Files (Coming Soon)"
"name": "Files"
},
{
"name": "Inference",
Expand Down Expand Up @@ -10342,10 +10342,10 @@
"Agents",
"BatchInference (Coming Soon)",
"Benchmarks",
"DatasetIO",
"Datasets",
"Datasets",
"Eval",
"Files (Coming Soon)",
"Files",
"Inference",
"Inspect",
"Models",
Expand Down
26 changes: 13 additions & 13 deletions docs/_static/llama-stack-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- DatasetIO
- Datasets
description: ''
parameters:
- name: dataset_id
Expand Down Expand Up @@ -350,7 +350,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: List all buckets.
parameters:
- name: bucket
Expand All @@ -377,7 +377,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: >-
Create a new upload session for a file identified by a bucket and key.
parameters: []
Expand Down Expand Up @@ -536,7 +536,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: >-
Get a file info identified by a bucket and key.
parameters:
Expand Down Expand Up @@ -572,7 +572,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: >-
Delete a file identified by a bucket and key.
parameters:
Expand Down Expand Up @@ -1224,7 +1224,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: >-
Returns information about an existsing upload session
parameters:
Expand Down Expand Up @@ -1255,7 +1255,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: >-
Upload file content to an existing upload session. On the server, request
body will have the raw bytes that are uploaded.
Expand Down Expand Up @@ -1477,7 +1477,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- DatasetIO
- Datasets
description: >-
Get a paginated list of rows from a dataset. Uses cursor-based pagination.
parameters:
Expand Down Expand Up @@ -1754,7 +1754,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Files (Coming Soon)
- Files
description: List all files in a bucket.
parameters:
- name: bucket
Expand Down Expand Up @@ -6931,12 +6931,12 @@ tags:
Agents API for creating and interacting with agentic systems.
- name: BatchInference (Coming Soon)
- name: Benchmarks
- name: DatasetIO
- name: Datasets
- name: Datasets
- name: Eval
x-displayName: >-
Llama Stack Evaluation API for running evaluations on model and agent candidates.
- name: Files (Coming Soon)
- name: Files
- name: Inference
description: >-
This API provides the raw interface to the underlying models. Two kinds of models
Expand Down Expand Up @@ -6971,10 +6971,10 @@ x-tagGroups:
- Agents
- BatchInference (Coming Soon)
- Benchmarks
- DatasetIO
- Datasets
- Datasets
- Eval
- Files (Coming Soon)
- Files
- Inference
- Inspect
- Models
Expand Down
39 changes: 22 additions & 17 deletions docs/openapi_generator/pyopenapi/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def __init__(self, endpoint: type, options: Options) -> None:
)
self.schema_builder = SchemaBuilder(schema_generator)
self.responses = {}

# Create standard error responses
self._create_standard_error_responses()

Expand All @@ -446,7 +446,7 @@ def _create_standard_error_responses(self) -> None:
"""
# Get the Error schema
error_schema = self.schema_builder.classdef_to_ref(Error)

# Create standard error responses
self.responses["BadRequest400"] = Response(
description="The request was invalid or malformed",
Expand All @@ -457,11 +457,11 @@ def _create_standard_error_responses(self) -> None:
"status": 400,
"title": "Bad Request",
"detail": "The request was invalid or malformed",
}
},
)
}
},
)

self.responses["TooManyRequests429"] = Response(
description="The client has sent too many requests in a given amount of time",
content={
Expand All @@ -471,11 +471,11 @@ def _create_standard_error_responses(self) -> None:
"status": 429,
"title": "Too Many Requests",
"detail": "You have exceeded the rate limit. Please try again later.",
}
},
)
}
},
)

self.responses["InternalServerError500"] = Response(
description="The server encountered an unexpected error",
content={
Expand All @@ -485,11 +485,11 @@ def _create_standard_error_responses(self) -> None:
"status": 500,
"title": "Internal Server Error",
"detail": "An unexpected error occurred. Our team has been notified.",
}
},
)
}
},
)

# Add a default error response for any unhandled error cases
self.responses["DefaultError"] = Response(
description="An unexpected error occurred",
Expand All @@ -500,9 +500,9 @@ def _create_standard_error_responses(self) -> None:
"status": 0,
"title": "Error",
"detail": "An unexpected error occurred",
}
},
)
}
},
)

def _build_type_tag(self, ref: str, schema: Schema) -> Tag:
Expand Down Expand Up @@ -547,11 +547,14 @@ def _build_operation(self, op: EndpointOperation) -> Operation:
"SyntheticDataGeneration",
"PostTraining",
"BatchInference",
"Files",
]:
op.defining_class.__name__ = f"{op.defining_class.__name__} (Coming Soon)"
print(op.defining_class.__name__)

# TODO (xiyan): temporary fix for datasetio inner impl + datasets api
if op.defining_class.__name__ in ["DatasetIO"]:
op.defining_class.__name__ = "Datasets"

doc_string = parse_type(op.func_ref)
doc_params = dict(
(param.name, param.description) for param in doc_string.params.values()
Expand Down Expand Up @@ -598,7 +601,9 @@ def _build_operation(self, op: EndpointOperation) -> Operation:

# data passed in request body as raw bytes cannot have request parameters
if raw_bytes_request_body and op.request_params:
raise ValueError("Cannot have both raw bytes request body and request parameters")
raise ValueError(
"Cannot have both raw bytes request body and request parameters"
)

# data passed in request body as raw bytes
if raw_bytes_request_body:
Expand Down Expand Up @@ -719,7 +724,7 @@ def _build_operation(self, op: EndpointOperation) -> Operation:
responses.update(response_builder.build_response(response_options))

assert len(responses.keys()) > 0, f"No responses found for {op.name}"

# Add standard error response references
if self.options.include_standard_error_responses:
if "400" not in responses:
Expand All @@ -730,7 +735,7 @@ def _build_operation(self, op: EndpointOperation) -> Operation:
responses["500"] = ResponseRef("InternalServerError500")
if "default" not in responses:
responses["default"] = ResponseRef("DefaultError")

if op.event_type is not None:
builder = ContentBuilder(self.schema_builder)
callbacks = {
Expand Down
Loading