Skip to content

Commit

Permalink
docs: finalize labeling models
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHieu01 committed Nov 27, 2023
1 parent 553fcae commit a2a0c38
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 39 deletions.
75 changes: 53 additions & 22 deletions docs/openapi/jan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -113,16 +126,22 @@ 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
required: true
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions docs/openapi/specs/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -253,10 +260,7 @@ components:
type: boolean
description: "Indicates whether the model was successfully deleted."
example: true
required:
- id
- object
- deleted


StartModelResponse:
type: object
Expand Down Expand Up @@ -313,8 +317,4 @@ components:
type: string
description: "The current state of the model after the start operation."
example: "downloaded"
required:
- id
- object
- state

0 comments on commit a2a0c38

Please sign in to comment.