chore: lint .yaml

This commit is contained in:
hieu-jan 2024-01-24 11:37:08 +09:00
parent b4ffe006fe
commit 64cabe3d56
5 changed files with 66 additions and 60 deletions

View File

@ -72,27 +72,27 @@ paths:
-H 'accept: application/json' \ -H 'accept: application/json' \
-H 'Content-Type: application/json' \ -H 'Content-Type: application/json' \
-d '{ -d '{
"messages": [ "messages": [
{ {
"content": "You are a helpful assistant.", "content": "You are a helpful assistant.",
"role": "system" "role": "system"
}, },
{ {
"content": "Hello!", "content": "Hello!",
"role": "user" "role": "user"
} }
], ],
"model": "tinyllama-1.1b", "model": "tinyllama-1.1b",
"stream": true, "stream": true,
"max_tokens": 2048, "max_tokens": 2048,
"stop": [ "stop": [
"hello" "hello"
], ],
"frequency_penalty": 0, "frequency_penalty": 0,
"presence_penalty": 0, "presence_penalty": 0,
"temperature": 0.7, "temperature": 0.7,
"top_p": 0.95 "top_p": 0.95
}' }'
/models: /models:
get: get:
operationId: listModels operationId: listModels

View File

@ -16,8 +16,7 @@ components:
stream: stream:
type: boolean type: boolean
default: true default: true
description: description: Enables continuous output generation, allowing for streaming of
Enables continuous output generation, allowing for streaming of
model responses. model responses.
model: model:
type: string type: string
@ -26,27 +25,23 @@ components:
max_tokens: max_tokens:
type: number type: number
default: 2048 default: 2048
description: description: The maximum number of tokens the model will generate in a single
The maximum number of tokens the model will generate in a single
response. response.
stop: stop:
type: arrays type: arrays
example: example:
- hello - hello
description: description: Defines specific tokens or phrases at which the model will stop
Defines specific tokens or phrases at which the model will stop
generating further output/ generating further output/
frequency_penalty: frequency_penalty:
type: number type: number
default: 0 default: 0
description: description: Adjusts the likelihood of the model repeating words or phrases in
Adjusts the likelihood of the model repeating words or phrases in
its output. its output.
presence_penalty: presence_penalty:
type: number type: number
default: 0 default: 0
description: description: Influences the generation of new and varied concepts in the model's
Influences the generation of new and varied concepts in the model's
output. output.
temperature: temperature:
type: number type: number

View File

@ -1,3 +1,4 @@
---
components: components:
schemas: schemas:
MessageObject: MessageObject:
@ -75,7 +76,7 @@ components:
example: msg_abc123 example: msg_abc123
object: object:
type: string 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 default: thread.message
created_at: created_at:
type: integer type: integer
@ -88,7 +89,7 @@ components:
example: thread_abc123 example: thread_abc123
role: role:
type: string type: string
description: "Role of the sender, either 'user' or 'assistant'." description: Role of the sender, either 'user' or 'assistant'.
example: user example: user
content: content:
type: array type: array
@ -97,7 +98,7 @@ components:
properties: properties:
type: type:
type: string type: string
description: "Type of content, e.g., 'text'." description: Type of content, e.g., 'text'.
example: text example: text
text: text:
type: object type: object
@ -110,21 +111,21 @@ components:
type: array type: array
items: items:
type: string type: string
description: "Annotations for the text content, if any." description: Annotations for the text content, if any.
example: [] example: []
file_ids: file_ids:
type: array type: array
items: items:
type: string 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: [] example: []
assistant_id: assistant_id:
type: string 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 example: null
run_id: run_id:
type: string type: string
description: "Run ID associated with the message, if applicable." description: Run ID associated with the message, if applicable.
example: null example: null
metadata: metadata:
type: object type: object
@ -139,7 +140,7 @@ components:
example: msg_abc123 example: msg_abc123
object: object:
type: string 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 example: thread.message
created_at: created_at:
type: integer type: integer
@ -152,7 +153,7 @@ components:
example: thread_abc123 example: thread_abc123
role: role:
type: string type: string
description: "Role of the sender, either 'user' or 'assistant'." description: Role of the sender, either 'user' or 'assistant'.
example: user example: user
content: content:
type: array type: array
@ -161,7 +162,7 @@ components:
properties: properties:
type: type:
type: string type: string
description: "Type of content, e.g., 'text'." description: Type of content, e.g., 'text'.
example: text example: text
text: text:
type: object type: object
@ -174,21 +175,21 @@ components:
type: array type: array
items: items:
type: string type: string
description: "Annotations for the text content, if any." description: Annotations for the text content, if any.
example: [] example: []
file_ids: file_ids:
type: array type: array
items: items:
type: string 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: [] example: []
assistant_id: assistant_id:
type: string 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 example: null
run_id: run_id:
type: string type: string
description: "Run ID associated with the message, if applicable." description: Run ID associated with the message, if applicable.
example: null example: null
metadata: metadata:
type: object type: object
@ -199,7 +200,7 @@ components:
properties: properties:
object: object:
type: string type: string
description: "Type of the object, indicating it's a list." description: Type of the object, indicating it's a list.
default: list default: list
data: data:
type: array type: array
@ -226,7 +227,7 @@ components:
example: msg_abc123 example: msg_abc123
object: object:
type: string 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 example: thread.message
created_at: created_at:
type: integer type: integer
@ -239,7 +240,7 @@ components:
example: thread_abc123 example: thread_abc123
role: role:
type: string type: string
description: "Role of the sender, either 'user' or 'assistant'." description: Role of the sender, either 'user' or 'assistant'.
example: user example: user
content: content:
type: array type: array
@ -248,7 +249,7 @@ components:
properties: properties:
type: type:
type: string type: string
description: "Type of content, e.g., 'text'." description: Type of content, e.g., 'text'.
text: text:
type: object type: object
properties: properties:
@ -260,20 +261,20 @@ components:
type: array type: array
items: items:
type: string type: string
description: "Annotations for the text content, if any." description: Annotations for the text content, if any.
file_ids: file_ids:
type: array type: array
items: items:
type: string 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: [] example: []
assistant_id: assistant_id:
type: string 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 example: null
run_id: run_id:
type: string type: string
description: "Run ID associated with the message, if applicable." description: Run ID associated with the message, if applicable.
example: null example: null
metadata: metadata:
type: object type: object

View File

@ -43,7 +43,9 @@ components:
description: description:
type: string type: string
description: Description of the model. 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: format:
type: string type: string
description: State format of the model, distinct from the engine. description: State format of the model, distinct from the engine.
@ -82,11 +84,14 @@ components:
type: string type: string
example: Jan example: Jan
tags: tags:
example: ["7B", "Merged", "Featured"] example:
- 7B
- Merged
- Featured
size: size:
example: 4370000000, example: 4370000000,
cover: 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: engine:
example: nitro example: nitro
ModelObject: ModelObject:
@ -141,7 +146,9 @@ components:
description: description:
type: string type: string
description: Description of the model. 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: format:
type: string type: string
description: State format of the model, distinct from the engine. description: State format of the model, distinct from the engine.
@ -180,11 +187,14 @@ components:
type: string type: string
example: MistralAI example: MistralAI
tags: tags:
example: ["7B", "Featured", "Foundation Model"] example:
- 7B
- Featured
- Foundation Model
size: size:
example: 4370000000, example: 4370000000,
cover: 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: engine:
example: nitro example: nitro
DeleteModelResponse: DeleteModelResponse:

View File

@ -142,7 +142,7 @@ components:
example: Jan example: Jan
instructions: instructions:
type: string type: string
description: | description: >
The instruction of assistant, defaults to "Be my grammar corrector" The instruction of assistant, defaults to "Be my grammar corrector"
model: model:
type: object type: object