1 line
1.8 KiB
JSON
1 line
1.8 KiB
JSON
{"openapi":"3.0.3","info":{"title":"tabby","description":"","license":{"name":""},"version":"0.1.0"},"paths":{"/v1/completions":{"post":{"tags":["completions"],"operationId":"completion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}},"required":true},"responses":{}}},"/v1/events":{"post":{"tags":["events"],"operationId":"log_event","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogEventRequest"}}},"required":true},"responses":{}}}},"components":{"schemas":{"Choice":{"type":"object","required":["index","text"],"properties":{"index":{"type":"integer","format":"int32","minimum":0.0},"text":{"type":"string"}}},"CompletionRequest":{"type":"object","properties":{"prompt":{"type":"string","deprecated":true,"example":"def fib(n):","nullable":true},"language":{"type":"string","description":"https://code.visualstudio.com/docs/languages/identifiers","example":"python","nullable":true},"segments":{"allOf":[{"$ref":"#/components/schemas/Segments"}],"nullable":true}}},"CompletionResponse":{"type":"object","required":["id","choices"],"properties":{"id":{"type":"string"},"choices":{"type":"array","items":{"$ref":"#/components/schemas/Choice"}}}},"LogEventRequest":{"type":"object","required":["type","completion_id","choice_index"],"properties":{"type":{"type":"string","example":"view"},"completion_id":{"type":"string"},"choice_index":{"type":"integer","format":"int32","minimum":0.0}}},"Segments":{"type":"object","required":["prefix"],"properties":{"prefix":{"type":"string","description":"Content that appears before the cursor in the editor window.","example":"def fib(n):\n "},"suffix":{"type":"string","description":"Content that appears after the cursor in the editor window.","example":"\n return fib(n - 1) + fib(n - 2)","nullable":true}}}}}} |