-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: First version of documentation pipeline
- Loading branch information
Showing
4 changed files
with
2,704 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Generate and deploy OpenAPI Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
generate-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ".[dev]" | ||
- name: Generate OpenAPI JSON | ||
run: python scripts/openapi.py | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Generate HTML from OpenAPI JSON | ||
run: npx @redocly/cli build-docs openapi.json | ||
|
||
- name: Move generated HTML to docs directory | ||
run: | | ||
mkdir -p docs | ||
mv redoc-static.html docs/index.html | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./docs | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"openapi": "3.1.0", "info": {"title": "eidos", "description": "Function calling framework for LLMs.", "version": "1.0.0"}, "paths": {"/healthz": {"get": {"tags": ["health"], "summary": "Health", "description": "Health check endpoint. Useful for liveness and readiness probes.", "operationId": "health_healthz_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HealthCheckResponse"}}}}}}}, "/api/v1/execution/{function_name}": {"post": {"tags": ["execution"], "summary": "Execute An Ai Function", "description": "Executes an AI function with the given arguments.", "operationId": "Execute_an_AI_function_api_v1_execution__function_name__post", "security": [{"APIKeyQuery": []}], "parameters": [{"name": "function_name", "in": "path", "required": true, "schema": {"type": "string", "title": "Function Name"}}], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Arguments"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Execute An Ai Function Api V1 Execution Function Name Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/functions/": {"get": {"tags": ["functions"], "summary": "List Available Functions", "description": "List all available functions.", "operationId": "List_available_functions_api_v1_functions__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"type": "object"}, "type": "array", "title": "Response List Available Functions Api V1 Functions Get"}}}}}, "security": [{"APIKeyQuery": []}]}}, "/api/v1/functions/names": {"get": {"tags": ["functions"], "summary": "List The Names Of All Available Ai Functions", "description": "List function names.", "operationId": "List_the_names_of_all_available_AI_functions_api_v1_functions_names_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"type": "string"}, "type": "array", "title": "Response List The Names Of All Available Ai Functions Api V1 Functions Names Get"}}}}}, "security": [{"APIKeyQuery": []}]}}, "/api/v1/functions/{function}": {"get": {"tags": ["functions"], "summary": "Get Definition Of A Function", "description": "Get the definition of a function.", "operationId": "Get_definition_of_a_function_api_v1_functions__function__get", "security": [{"APIKeyQuery": []}], "parameters": [{"name": "function", "in": "path", "required": true, "schema": {"type": "string", "title": "Function"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Get Definition Of A Function Api V1 Functions Function Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/functions/{function}/schema": {"get": {"tags": ["functions"], "summary": "Get The Response Schema Of A Function", "description": "Get the response schema of a function.", "operationId": "Get_the_response_schema_of_a_function_api_v1_functions__function__schema_get", "security": [{"APIKeyQuery": []}], "parameters": [{"name": "function", "in": "path", "required": true, "schema": {"type": "string", "title": "Function"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Get The Response Schema Of A Function Api V1 Functions Function Schema Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "HealthCheckResponse": {"properties": {"status": {"type": "string", "title": "Status"}}, "type": "object", "required": ["status"], "title": "HealthCheckResponse"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}, "securitySchemes": {"APIKeyQuery": {"type": "apiKey", "in": "query", "name": "X-API-Key"}}}} |
Oops, something went wrong.