Skip to content

Commit

Permalink
docs: update openapi.json to v0.3.0 (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys authored Oct 14, 2023
1 parent 7ae1a97 commit b3c119d
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 11 deletions.
23 changes: 23 additions & 0 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,29 @@
font-weight: 600;
}

.get a {
display: flex;
}

.get a::after {
content: "get";
margin-left: auto;
display: inline-block;
position: relative;
top: 1px;
margin-right: -6px;
padding: 3px 6px;
border: 1px solid var(--ifm-color-success);
border-radius: 3px;
color: white;
background: var(--ifm-color-success);
text-transform: uppercase;
font-size: 10px;
line-height: 10px;
height: 10px;
font-weight: 600;
}

.Playground .monaco-editor {
padding-top: 15px;
}
177 changes: 166 additions & 11 deletions website/static/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
"openapi": "3.0.3",
"info": {
"title": "Tabby Server",
"description": "\n[![tabby stars](https://img.shields.io/github/stars/TabbyML/tabby?style=social)](https://github.com/TabbyML/tabby)\n\nOpenAPI documentation for [tabby](https://github.com/TabbyML/tabby), a self-hosted AI coding assistant.",
"description": "\n[![tabby stars](https://img.shields.io/github/stars/TabbyML/tabby)](https://github.com/TabbyML/tabby)\n[![Join Slack](https://shields.io/badge/Tabby-Join%20Slack-red?logo=slack)](https://join.slack.com/t/tabbycommunity/shared_invite/zt-1xeiddizp-bciR2RtFTaJ37RBxr8VxpA)\n\nInstall following IDE / Editor extensions to get started with [Tabby](https://github.com/TabbyML/tabby).\n* [VSCode Extension](https://github.com/TabbyML/tabby/tree/main/clients/vscode) – Install from the [marketplace](https://marketplace.visualstudio.com/items?itemName=TabbyML.vscode-tabby), or [open-vsx.org](https://open-vsx.org/extension/TabbyML/vscode-tabby)\n* [VIM Extension](https://github.com/TabbyML/tabby/tree/main/clients/vim)\n* [IntelliJ Platform Plugin](https://github.com/TabbyML/tabby/tree/main/clients/intellij) – Install from the [marketplace](https://plugins.jetbrains.com/plugin/22379-tabby)\n",
"license": {
"name": "Apache 2.0",
"url": "https://github.com/TabbyML/tabby/blob/main/LICENSE"
},
"version": "0.1.0"
"version": "0.3.0"
},
"servers": [
{
"url": "https://playground.app.tabbyml.com",
"description": "Playground server"
},
{
"url": "http://localhost:8080",
"description": "Local server"
}
],
"paths": {
Expand Down Expand Up @@ -80,7 +76,7 @@
}
},
"/v1/health": {
"post": {
"get": {
"tags": [
"v1"
],
Expand All @@ -102,6 +98,47 @@
},
"components": {
"schemas": {
"ChatCompletionChunk": {
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"type": "string"
}
}
},
"ChatCompletionRequest": {
"type": "object",
"required": [
"messages"
],
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
}
},
"example": {
"messages": [
{
"content": "What is tail recursion?",
"role": "user"
},
{
"content": "It's a kind of optimization in compiler?",
"role": "assistant"
},
{
"content": "Could you share more details?",
"role": "user"
}
]
}
},
"Choice": {
"type": "object",
"required": [
Expand All @@ -124,6 +161,7 @@
"properties": {
"prompt": {
"type": "string",
"deprecated": true,
"example": "def fib(n):",
"nullable": true
},
Expand All @@ -143,6 +181,7 @@
},
"user": {
"type": "string",
"description": "A unique identifier representing your end-user, which can help Tabby to monitor & generating\nreports.",
"nullable": true
}
},
Expand Down Expand Up @@ -170,14 +209,22 @@
"$ref": "#/components/schemas/Choice"
}
}
},
"example": {
"choices": [
{
"index": 0,
"text": "string"
}
],
"id": "string"
}
},
"HealthState": {
"type": "object",
"required": [
"model",
"device",
"compute_type",
"arch",
"cpu_info",
"cpu_count",
Expand All @@ -188,10 +235,11 @@
"model": {
"type": "string"
},
"device": {
"type": "string"
"chat_model": {
"type": "string",
"nullable": true
},
"compute_type": {
"device": {
"type": "string"
},
"arch": {
Expand All @@ -215,6 +263,59 @@
}
}
},
"Hit": {
"type": "object",
"required": [
"score",
"doc",
"id"
],
"properties": {
"score": {
"type": "number",
"format": "float"
},
"doc": {
"$ref": "#/components/schemas/HitDocument"
},
"id": {
"type": "integer",
"format": "int32",
"minimum": 0
}
}
},
"HitDocument": {
"type": "object",
"required": [
"body",
"filepath",
"git_url",
"kind",
"language",
"name"
],
"properties": {
"body": {
"type": "string"
},
"filepath": {
"type": "string"
},
"git_url": {
"type": "string"
},
"kind": {
"type": "string"
},
"language": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"LogEventRequest": {
"type": "object",
"required": [
Expand All @@ -238,6 +339,40 @@
}
}
},
"Message": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string"
},
"content": {
"type": "string"
}
}
},
"SearchResponse": {
"type": "object",
"required": [
"num_hits",
"hits"
],
"properties": {
"num_hits": {
"type": "integer",
"minimum": 0
},
"hits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Hit"
}
}
}
},
"Segments": {
"type": "object",
"required": [
Expand All @@ -255,6 +390,26 @@
}
}
},
"Snippet": {
"type": "object",
"required": [
"filepath",
"body",
"score"
],
"properties": {
"filepath": {
"type": "string"
},
"body": {
"type": "string"
},
"score": {
"type": "number",
"format": "float"
}
}
},
"Version": {
"type": "object",
"required": [
Expand Down

0 comments on commit b3c119d

Please sign in to comment.