Commit b3490554 authored by Wade's avatar Wade

add split swagger

parent bd287386
openapi: 3.0.4
info:
title: Genkit Chat API
description: API for interacting with chat and indexing endpoints powered by Genkit.
description: API for interacting with chat, indexing, and document splitting endpoints powered by Genkit.
version: 0.1.0
paths:
/split/document:
post:
summary: Reconstruct document with Server-Sent Events
description: Reconstructs a document from a base64-encoded file for processing, supporting Server-Sent Events (SSE).
tags:
- Split
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
FileType:
type: string
description: The type of the file to be reconstructed
example: "TXT"
FileBase64:
type: string
description: The base64-encoded content of the file
example: "data:application/octet-stream;base64,4oCc6L+Z5bCx6LGh6Iqx5LiA5qC344CC5aaC5p6c5L2g54ix5LiK5LqG5LiA5py155Sf6ZW/IArlnKjkuIDpopfmmJ/mmJ/kuIrnmoToirHvvIzpgqPkuYjlpJzpl7TvvIwgCuS9oOeci+edgOWkqeepuuWwseaEn+WIsOeUnOicnOaEiSAK5b+r44CC5omA5pyJ55qE5pif5pif5LiK6YO9CuWlveixoeW8gOedgOiKseOAguKAnQ=="
required:
- FileType
- FileBase64
responses:
'200':
description: Successful reconstruction of the document with SSE
content:
text/event-stream:
schema:
type: string
description: Server-Sent Events stream containing the reconstructed document data
examples:
success:
value: |
data: {"status": "success", "document": "reconstructed content"}
event: message
id: 1
data: {"status": "complete"}
'400':
description: Invalid input or malformed request
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
examples:
error:
value:
data: ""
code: 400
msg: "Invalid file type or base64 content"
/index/document:
post:
summary: Store Milvus index data
......@@ -174,4 +225,4 @@ components:
required:
- data
- code
- msg
\ No newline at end of file
- msg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment