Skip to content

Commit

Permalink
chore: lint .yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHieu01 committed Jan 24, 2024
1 parent b4ffe00 commit 64cabe3
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 60 deletions.
42 changes: 21 additions & 21 deletions docs/openapi/jan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ paths:
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "Hello!",
"role": "user"
}
],
"model": "tinyllama-1.1b",
"stream": true,
"max_tokens": 2048,
"stop": [
"hello"
],
"frequency_penalty": 0,
"presence_penalty": 0,
"temperature": 0.7,
"top_p": 0.95
}'
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "Hello!",
"role": "user"
}
],
"model": "tinyllama-1.1b",
"stream": true,
"max_tokens": 2048,
"stop": [
"hello"
],
"frequency_penalty": 0,
"presence_penalty": 0,
"temperature": 0.7,
"top_p": 0.95
}'
/models:
get:
operationId: listModels
Expand Down
15 changes: 5 additions & 10 deletions docs/openapi/specs/chat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ components:
stream:
type: boolean
default: true
description:
Enables continuous output generation, allowing for streaming of
description: Enables continuous output generation, allowing for streaming of
model responses.
model:
type: string
Expand All @@ -26,27 +25,23 @@ components:
max_tokens:
type: number
default: 2048
description:
The maximum number of tokens the model will generate in a single
description: The maximum number of tokens the model will generate in a single
response.
stop:
type: arrays
example:
- hello
description:
Defines specific tokens or phrases at which the model will stop
description: Defines specific tokens or phrases at which the model will stop
generating further output/
frequency_penalty:
type: number
default: 0
description:
Adjusts the likelihood of the model repeating words or phrases in
description: Adjusts the likelihood of the model repeating words or phrases in
its output.
presence_penalty:
type: number
default: 0
description:
Influences the generation of new and varied concepts in the model's
description: Influences the generation of new and varied concepts in the model's
output.
temperature:
type: number
Expand Down
45 changes: 23 additions & 22 deletions docs/openapi/specs/messages.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
components:
schemas:
MessageObject:
Expand Down Expand Up @@ -75,7 +76,7 @@ components:
example: msg_abc123
object:
type: string
description: "Type of the object, indicating it's a thread message."
description: Type of the object, indicating it's a thread message.
default: thread.message
created_at:
type: integer
Expand All @@ -88,7 +89,7 @@ components:
example: thread_abc123
role:
type: string
description: "Role of the sender, either 'user' or 'assistant'."
description: Role of the sender, either 'user' or 'assistant'.
example: user
content:
type: array
Expand All @@ -97,7 +98,7 @@ components:
properties:
type:
type: string
description: "Type of content, e.g., 'text'."
description: Type of content, e.g., 'text'.
example: text
text:
type: object
Expand All @@ -110,21 +111,21 @@ components:
type: array
items:
type: string
description: "Annotations for the text content, if any."
description: Annotations for the text content, if any.
example: []
file_ids:
type: array
items:
type: string
description: "Array of file IDs associated with the message, if any."
description: Array of file IDs associated with the message, if any.
example: []
assistant_id:
type: string
description: "Identifier of the assistant involved in the message, if applicable."
description: Identifier of the assistant involved in the message, if applicable.
example: null
run_id:
type: string
description: "Run ID associated with the message, if applicable."
description: Run ID associated with the message, if applicable.
example: null
metadata:
type: object
Expand All @@ -139,7 +140,7 @@ components:
example: msg_abc123
object:
type: string
description: "Type of the object, indicating it's a thread message."
description: Type of the object, indicating it's a thread message.
example: thread.message
created_at:
type: integer
Expand All @@ -152,7 +153,7 @@ components:
example: thread_abc123
role:
type: string
description: "Role of the sender, either 'user' or 'assistant'."
description: Role of the sender, either 'user' or 'assistant'.
example: user
content:
type: array
Expand All @@ -161,7 +162,7 @@ components:
properties:
type:
type: string
description: "Type of content, e.g., 'text'."
description: Type of content, e.g., 'text'.
example: text
text:
type: object
Expand All @@ -174,21 +175,21 @@ components:
type: array
items:
type: string
description: "Annotations for the text content, if any."
description: Annotations for the text content, if any.
example: []
file_ids:
type: array
items:
type: string
description: "Array of file IDs associated with the message, if any."
description: Array of file IDs associated with the message, if any.
example: []
assistant_id:
type: string
description: "Identifier of the assistant involved in the message, if applicable."
description: Identifier of the assistant involved in the message, if applicable.
example: null
run_id:
type: string
description: "Run ID associated with the message, if applicable."
description: Run ID associated with the message, if applicable.
example: null
metadata:
type: object
Expand All @@ -199,7 +200,7 @@ components:
properties:
object:
type: string
description: "Type of the object, indicating it's a list."
description: Type of the object, indicating it's a list.
default: list
data:
type: array
Expand All @@ -226,7 +227,7 @@ components:
example: msg_abc123
object:
type: string
description: "Type of the object, indicating it's a thread message."
description: Type of the object, indicating it's a thread message.
example: thread.message
created_at:
type: integer
Expand All @@ -239,7 +240,7 @@ components:
example: thread_abc123
role:
type: string
description: "Role of the sender, either 'user' or 'assistant'."
description: Role of the sender, either 'user' or 'assistant'.
example: user
content:
type: array
Expand All @@ -248,7 +249,7 @@ components:
properties:
type:
type: string
description: "Type of content, e.g., 'text'."
description: Type of content, e.g., 'text'.
text:
type: object
properties:
Expand All @@ -260,20 +261,20 @@ components:
type: array
items:
type: string
description: "Annotations for the text content, if any."
description: Annotations for the text content, if any.
file_ids:
type: array
items:
type: string
description: "Array of file IDs associated with the message, if any."
description: Array of file IDs associated with the message, if any.
example: []
assistant_id:
type: string
description: "Identifier of the assistant involved in the message, if applicable."
description: Identifier of the assistant involved in the message, if applicable.
example: null
run_id:
type: string
description: "Run ID associated with the message, if applicable."
description: Run ID associated with the message, if applicable.
example: null
metadata:
type: object
Expand Down
22 changes: 16 additions & 6 deletions docs/openapi/specs/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ components:
description:
type: string
description: Description of the model.
example: Trinity is an experimental model merge using the Slerp method. Recommended for daily assistance purposes.
example:
Trinity is an experimental model merge using the Slerp method.
Recommended for daily assistance purposes.
format:
type: string
description: State format of the model, distinct from the engine.
Expand Down Expand Up @@ -82,11 +84,14 @@ components:
type: string
example: Jan
tags:
example: ["7B", "Merged", "Featured"]
example:
- 7B
- Merged
- Featured
size:
example: 4370000000,
cover:
example: "https://raw.githubusercontent.com/janhq/jan/main/models/trinity-v1.2-7b/cover.png"
example: https://raw.githubusercontent.com/janhq/jan/main/models/trinity-v1.2-7b/cover.png
engine:
example: nitro
ModelObject:
Expand Down Expand Up @@ -141,7 +146,9 @@ components:
description:
type: string
description: Description of the model.
example: Trinity is an experimental model merge using the Slerp method. Recommended for daily assistance purposes.
example:
Trinity is an experimental model merge using the Slerp method.
Recommended for daily assistance purposes.
format:
type: string
description: State format of the model, distinct from the engine.
Expand Down Expand Up @@ -180,11 +187,14 @@ components:
type: string
example: MistralAI
tags:
example: ["7B", "Featured", "Foundation Model"]
example:
- 7B
- Featured
- Foundation Model
size:
example: 4370000000,
cover:
example: "https://raw.githubusercontent.com/janhq/jan/main/models/mistral-ins-7b-q4/cover.png"
example: https://raw.githubusercontent.com/janhq/jan/main/models/mistral-ins-7b-q4/cover.png
engine:
example: nitro
DeleteModelResponse:
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi/specs/threads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ components:
example: Jan
instructions:
type: string
description: |
description: >
The instruction of assistant, defaults to "Be my grammar corrector"
model:
type: object
Expand Down

0 comments on commit 64cabe3

Please sign in to comment.