From 93d5d8b297d58a5e2be37e63341458f0f1bc0a74 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Tue, 13 Jun 2023 13:13:03 -0700 Subject: [PATCH] docs: update website openapi.json --- crates/tabby/src/serve/mod.rs | 2 +- website/static/openapi.json | 32 +++++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/crates/tabby/src/serve/mod.rs b/crates/tabby/src/serve/mod.rs index 2302e44..3a2d482 100644 --- a/crates/tabby/src/serve/mod.rs +++ b/crates/tabby/src/serve/mod.rs @@ -27,7 +27,7 @@ OpenAPI documentation for [tabby](https://github.com/TabbyML/tabby), a self-host license(name = "Apache 2.0", url="https://github.com/TabbyML/tabby/blob/main/LICENSE") ), servers( - (url = "https://tabbyml.app.tabbyml.com/tabby", description = "Local server"), + (url = "https://playground.app.tabbyml.com/tabby", description = "Playground server"), (url = "http://localhost:8080", description = "Local server"), ), paths(events::log_event, completions::completion, health::health), diff --git a/website/static/openapi.json b/website/static/openapi.json index f5b4959..d43a02b 100644 --- a/website/static/openapi.json +++ b/website/static/openapi.json @@ -11,8 +11,8 @@ }, "servers": [ { - "url": "https://tabbyml.app.tabbyml.com/tabby", - "description": "Local server" + "url": "https://playground.app.tabbyml.com/tabby", + "description": "Playground server" }, { "url": "http://localhost:8080", @@ -87,7 +87,14 @@ "operationId": "health", "responses": { "200": { - "description": "Health" + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HealthState" + } + } + } } } } @@ -155,6 +162,25 @@ } } }, + "HealthState": { + "type": "object", + "required": [ + "model", + "device", + "compute_type" + ], + "properties": { + "model": { + "type": "string" + }, + "device": { + "type": "string" + }, + "compute_type": { + "type": "string" + } + } + }, "LogEventRequest": { "type": "object", "required": [