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
46 changes: 36 additions & 10 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ permissions:
jobs:
build:
if: ${{ github.event.inputs.action != 'deploy-only' }}
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-core

steps:
- name: Checkout this repository
Expand Down Expand Up @@ -285,33 +285,59 @@ jobs:
run: |
cd "${{ env.TEMP_DIR }}/llama-stack/docs"

# Generate API docs selectively based on cache status
echo "🔄 Generating API docs..."
# Generate API docs in parallel for better performance
echo "🔄 Generating API docs in parallel..."

# Start background processes for each API docs generation
PIDS=()

# Generate stable API docs if not cached
if [ "${{ steps.cache-api-stable.outputs.cache-hit }}" != 'true' ]; then
echo " 📄 Generating stable API docs (cache miss)..."
npm run gen-api-docs stable
echo " 📄 Starting stable API docs generation (cache miss)..."
npm run gen-api-docs stable &
STABLE_PID=$!
PIDS+=($STABLE_PID)
echo " 🔄 Stable API docs generation started (PID: $STABLE_PID)"
else
echo " ⚡ Using cached stable API docs"
fi

# Generate experimental API docs if not cached
if [ "${{ steps.cache-api-experimental.outputs.cache-hit }}" != 'true' ]; then
echo " 📄 Generating experimental API docs (cache miss)..."
npm run gen-api-docs experimental
echo " 📄 Starting experimental API docs generation (cache miss)..."
npm run gen-api-docs experimental &
EXPERIMENTAL_PID=$!
PIDS+=($EXPERIMENTAL_PID)
echo " 🔄 Experimental API docs generation started (PID: $EXPERIMENTAL_PID)"
else
echo " ⚡ Using cached experimental API docs"
fi

# Generate deprecated API docs if not cached
if [ "${{ steps.cache-api-deprecated.outputs.cache-hit }}" != 'true' ]; then
echo " 📄 Generating deprecated API docs (cache miss)..."
npm run gen-api-docs deprecated
echo " 📄 Starting deprecated API docs generation (cache miss)..."
npm run gen-api-docs deprecated &
DEPRECATED_PID=$!
PIDS+=($DEPRECATED_PID)
echo " 🔄 Deprecated API docs generation started (PID: $DEPRECATED_PID)"
else
echo " ⚡ Using cached deprecated API docs"
fi

# Wait for all parallel processes to complete
if [ ${#PIDS[@]} -gt 0 ]; then
echo " ⏳ Waiting for ${#PIDS[@]} API docs generation processes to complete..."
for pid in "${PIDS[@]}"; do
echo " ⏳ Waiting for process $pid..."
if wait $pid; then
echo " ✅ Process $pid completed successfully"
else
echo " ❌ Process $pid failed"
exit 1
fi
done
fi

echo "✅ API docs generation completed"

# Create version if not latest (after content is ready)
Expand Down Expand Up @@ -540,7 +566,7 @@ jobs:

deploy-only:
if: ${{ github.event.inputs.action == 'deploy-only' }}
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-core
permissions:
contents: read
pages: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';

<DocCardList items={useCurrentSidebarCategory().items}/>
```

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';

<DocCardList items={useCurrentSidebarCategory().items}/>
```

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Heading from "@theme/Heading";
path={"/v1alpha/eval/benchmarks/{benchmark_id}"}
context={"endpoint"}
>

</MethodEndpoint>


Expand All @@ -49,23 +49,20 @@ Get a benchmark by its ID.
<ParamsDetails
parameters={[{"name":"benchmark_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the benchmark to get.","title":"Benchmark Id"},"description":"The ID of the benchmark to get."}]}
>

</ParamsDetails>

<RequestSchema
title={"Body"}
body={undefined}
>

</RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"A Benchmark.","content":{"application/json":{"schema":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Unique identifier for this resource in llama stack"},"provider_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unique identifier for this resource in the provider"},"provider_id":{"type":"string","title":"Provider Id","description":"ID of the provider that owns this resource"},"type":{"type":"string","const":"benchmark","title":"Type","description":"The resource type, always benchmark.","default":"benchmark"},"dataset_id":{"type":"string","title":"Dataset Id","description":"Identifier of the dataset to use for the benchmark evaluation."},"scoring_functions":{"items":{"type":"string"},"type":"array","title":"Scoring Functions","description":"List of scoring function identifiers to apply during evaluation."},"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."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":400,"title":"Bad Request","detail":"The request was invalid or malformed"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":429,"title":"Too Many Requests","detail":"You have exceeded the rate limit. Please try again later."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":500,"title":"Internal Server Error","detail":"An unexpected error occurred"}}}},"default":{"description":"Default Response","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"}}}}}}
>

</StatusCodes>


</StatusCodes>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Heading from "@theme/Heading";
path={"/v1beta/datasets/{dataset_id}"}
context={"endpoint"}
>

</MethodEndpoint>


Expand All @@ -49,23 +49,20 @@ Get a dataset by its ID.
<ParamsDetails
parameters={[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","description":"The ID of the dataset to get.","title":"Dataset Id"},"description":"The ID of the dataset to get."}]}
>

</ParamsDetails>

<RequestSchema
title={"Body"}
body={undefined}
>

</RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"The dataset object.","content":{"application/json":{"schema":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Unique identifier for this resource in llama stack"},"provider_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unique identifier for this resource in the provider"},"provider_id":{"type":"string","title":"Provider Id","description":"ID of the provider that owns this resource"},"type":{"type":"string","const":"dataset","title":"Type","description":"Type of resource, always 'dataset' for datasets","default":"dataset"},"purpose":{"description":"Purpose of the dataset indicating its intended use","type":"string","enum":["post-training/messages","eval/question-answer","eval/messages-answer"],"title":"DatasetPurpose"},"source":{"oneOf":[{"title":"URIDataSource","properties":{"type":{"type":"string","const":"uri","title":"Type","description":"The type of data source.","default":"uri"},"uri":{"type":"string","title":"Uri","description":"The dataset can be obtained from a URI. E.g. \"https://mywebsite.com/mydata.jsonl\", \"lsfs://mydata.jsonl\", \"data:csv;base64,{base64_content}\""}},"type":"object","required":["uri"],"description":"A dataset that can be obtained from a URI."},{"title":"RowsDataSource","properties":{"type":{"type":"string","const":"rows","title":"Type","description":"The type of data source.","default":"rows"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows","description":"The dataset is stored in rows. E.g. [{\"messages\": [{\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}]}]"}},"type":"object","required":["rows"],"description":"A dataset stored in rows."}],"title":"URIDataSource | RowsDataSource","description":"Data source configuration for the dataset","discriminator":{"propertyName":"type","mapping":{"rows":{"properties":{"type":{"type":"string","const":"rows","title":"Type","description":"The type of data source.","default":"rows"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows","description":"The dataset is stored in rows. E.g. [{\"messages\": [{\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}]}]"}},"type":"object","required":["rows"],"title":"RowsDataSource","description":"A dataset stored in rows."},"uri":{"properties":{"type":{"type":"string","const":"uri","title":"Type","description":"The type of data source.","default":"uri"},"uri":{"type":"string","title":"Uri","description":"The dataset can be obtained from a URI. E.g. \"https://mywebsite.com/mydata.jsonl\", \"lsfs://mydata.jsonl\", \"data:csv;base64,{base64_content}\""}},"type":"object","required":["uri"],"title":"URIDataSource","description":"A dataset that can be obtained from a URI."}}}},"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."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":400,"title":"Bad Request","detail":"The request was invalid or malformed"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":429,"title":"Too Many Requests","detail":"You have exceeded the rate limit. Please try again later."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":500,"title":"Internal Server Error","detail":"An unexpected error occurred"}}}},"default":{"description":"Default Response","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"}}}}}}
>

</StatusCodes>


</StatusCodes>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import Heading from "@theme/Heading";
path={"/v1/models/{model_id}"}
context={"endpoint"}
>

</MethodEndpoint>


Expand All @@ -51,23 +51,20 @@ Get a model by its identifier.
<ParamsDetails
parameters={[{"name":"model_id","in":"path","required":true,"schema":{"type":"string"},"description":"Path parameter: model_id"}]}
>

</ParamsDetails>

<RequestSchema
title={"Body"}
body={undefined}
>

</RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"A Model.","content":{"application/json":{"schema":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Unique identifier for this resource in llama stack"},"provider_resource_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Unique identifier for this resource in the provider"},"provider_id":{"type":"string","title":"Provider Id","description":"ID of the provider that owns this resource"},"type":{"type":"string","const":"model","title":"Type","default":"model"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Any additional metadata for this model"},"model_type":{"default":"llm","type":"string","enum":["llm","embedding","rerank"],"title":"ModelType","description":"Enumeration of supported model types in Llama Stack."}},"type":"object","required":["identifier","provider_id"],"title":"Model","description":"A model resource representing an AI model registered in Llama Stack."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":400,"title":"Bad Request","detail":"The request was invalid or malformed"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":429,"title":"Too Many Requests","detail":"You have exceeded the rate limit. Please try again later."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"},"example":{"status":500,"title":"Internal Server Error","detail":"An unexpected error occurred"}}}},"default":{"description":"Default Response","content":{"application/json":{"schema":{"description":"Error response from the API. Roughly follows RFC 7807.","properties":{"status":{"title":"Status","type":"integer"},"title":{"title":"Title","type":"string"},"detail":{"title":"Detail","type":"string"},"instance":{"anyOf":[{"type":"string"},{"type":"null"}],"nullable":true}},"required":["status","title","detail"],"title":"Error","type":"object"}}}}}}
>

</StatusCodes>


</StatusCodes>
Loading