docs: finalize labeling models

This commit is contained in:
hieu-jan 2023-11-28 05:57:13 +09:00
parent 553fcae681
commit a2a0c38144
2 changed files with 70 additions and 39 deletions

View File

@ -52,8 +52,12 @@ paths:
tags:
- Models
summary: List Models
description: Lists the currently available models, and provides basic information about each one such as the owner and availability.
summary: List models
description: |
<a href = "https://platform.openai.com/docs/api-reference/models/list"> <button style = "color: #388434"> OpenAI Compatible </button></a>
Lists the currently available models, and provides basic information about each one such as the owner and availability.
responses:
"200":
description: OK
@ -69,8 +73,11 @@ paths:
operationId: downloadModel
tags:
- Models
summary: Download Model
description: Download a model.
summary: Download model
description: |
<span style = "color: #fec928"> Jan </span>
Download a model.
responses:
"200":
description: OK
@ -84,20 +91,26 @@ paths:
curl -X POST https://localhost:1337/v1/models
/models/{model_id}:
get:
operationId: getModel
operationId: retrieveModel
tags:
- Models
summary: Get Model
description: Get a model instance, providing basic information about the model such as the owner and permissioning.
summary: Retrieve model
description: |
<a href = "https://platform.openai.com/docs/api-reference/models/retrieve"> <button style = "color: #388434"> OpenAI Compatible </button></a>
Get a model instance, providing basic information about the model such as the owner and permissioning.
parameters:
- in: path
name: source_url
name: model_id
required: true
schema:
type: string
# ideally this will be an actual ID, so this will always work from browser
example: https://huggingface.com/thebloke/example.gguf
description: The ID of the model to use for this request
example: zephyr-7b
description: |
The ID of the model to use for this request
<span style="color:#388434">OpenAI compatible</span>
responses:
"200":
description: OK
@ -113,8 +126,11 @@ paths:
operationId: deleteModel
tags:
- Models
summary: Delete Model
description: Delete a model.
summary: Delete model
description: |
<a href = "https://platform.openai.com/docs/api-reference/models/delete"> <button style = "color: #388434"> OpenAI Compatible </button></a>
Delete a model.
parameters:
- in: path
name: model
@ -122,7 +138,10 @@ paths:
schema:
type: string
example: zephyr-7b
description: The model to delete
description: |
The model to delete
<span style="color:#388434">OpenAI compatible</span>
responses:
"200":
description: OK
@ -139,8 +158,11 @@ paths:
operationId: startModel
tags:
- Models
summary: Start Model
description: Starts an imported model. Loads the model into V/RAM.
summary: Start model
description: |
<span style = "color: #fec928"> Jan </span>
Starts an imported model. Loads the model into V/RAM.
parameters:
- in: path
name: model
@ -149,7 +171,8 @@ paths:
type: string
# ideally this will be an actual ID, so this will always work from browser
example: zephyr-7b
description: The ID of the model to use for this request
description: |
The ID of the model to use for this request
responses:
"200":
description: OK
@ -166,8 +189,11 @@ paths:
operationId: stopModel
tags:
- Models
summary: Stop Model
description: Stop an imported model.
summary: Stop model
description: |
<span style = "color: #fec928"> Jan </span>
Stop an imported model.
parameters:
- in: path
name: model
@ -437,7 +463,7 @@ paths:
operationId: listMessages
tags:
- Messages
summary: List messaages
summary: List messages
description: Retrieves all messages from the given thread.
parameters:
- in: path
@ -564,7 +590,7 @@ paths:
'read:pets': read your pets
description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #388434"> OpenAI Compatible </button></a>
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #fec928">Jan.AI Compatible </button></a>
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #fec928"> Jan </button></a>
Returns a list of message files.
@ -588,7 +614,7 @@ paths:
description: |
The ID of the message whose files are to be listed.
<span style="color:#388434">Open.AI Compatible</span>
<span style="color:#388434">OpenAI compatible</span>
responses:
"200":
description: List of files retrieved successfully
@ -648,7 +674,12 @@ x-webhooks:
ModelObject:
post:
summary: The model object
description: Information about a model in the systems
description: |
<a href = "https://platform.openai.com/docs/api-reference/models/object"> <button style = "color: #388434"> OpenAI Compatible </button></a>
Describe a model offering that can be used with the API.
operationId: ModelObject
tags:
- Models

View File

@ -117,26 +117,33 @@ components:
properties:
id:
type: string
description: "The identifier of the model."
description: |
"The identifier of the model."
<span style="color:#388434">OpenAI compatible</span>
example: "zephyr-7b"
object:
type: string
description: "The type of the object, indicating it's a model."
description: |
"The type of the object, indicating it's a model."
<span style="color:#388434">OpenAI compatible</span>
default: "model"
created:
type: integer
format: int64
description: "Unix timestamp representing the creation time of the model."
description: |
"Unix timestamp representing the creation time of the model."
<span style="color:#388434">OpenAI compatible</span>
example: "1253935178"
owned_by:
type: string
description: "The entity that owns the model."
description: |
"The entity that owns the model."
<span style="color:#388434">OpenAI compatible</span>
example: "_"
required:
- id
- object
- created
- owned_by
GetModelResponse:
type: object
@ -253,10 +260,7 @@ components:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true
required:
- id
- object
- deleted
StartModelResponse:
type: object
@ -313,8 +317,4 @@ components:
type: string
description: "The current state of the model after the start operation."
example: "downloaded"
required:
- id
- object
- state