$ref: '#/components/schemas/FileDetail'
/{user}/{repo}/cat-file/{uid}:
get:
description: If you want to get a content of a file or a chunk, I recommend you use `/{user}/{repo}/content/{uid}` api instead of this. This api exists for historical reasons.
operationId: GetCatFile
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
- name: uid
in: path
required: true
description: uid of a file or a chunk
schema:
type: string
responses:
'200':
description: It's exactly same as running `rag cat-file` with the uid.
content:
text/plain:
schema:
type: string
/{user}/{repo}/content/{uid}:
get:
description: It's useful when you want to render a content of a chunk or a file. It doesn't give you the content of the original file, but a version that LLMs actually see when they RAG.
operationId: GetContent
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
- name: uid
in: path
required: true
description: uid of a file or a chunk
schema:
type: string
responses:
'200':
description: ""
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/MultiModalContent'
/{user}/{repo}/archive-list:
get:
description: Ragit client uses this API to clone knowledge-bases.
/{user}/{repo}/archive/{archive-id}:
get:
description: Ragit client uses this API to clone knowledge-bases.
/{user}/{repo}/meta:
get:
operationId: GetMeta
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
responses:
'200':
description: meta.json
content:
application/json:
schema:
type: object
additionalProperties:
type: string
/{user}/{repo}/meta/{key}:
get:
operationId: GetMetaByKey
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
- name: key
in: path
required: true
description: metadata key
schema:
type: string
responses:
'200':
description: metadata value
content:
application/json:
schema:
type: string
nullable: true
/{user}/{repo}/version:
get:
operationId: GetRepoVersion
parameters:
- name: user
in: path
required: true
description: user id
schema:
type: string
- name: repo
in: path
required: true
description: repository name
schema:
type: string
responses:
'200':
description: version of the repository
content:
text/plain:
schema: