docs: fix chat payload and cURL

This commit is contained in:
Ho Duc Hieu 2024-01-05 08:16:33 +07:00
parent 9cf1701471
commit 2a6e5bc338
6 changed files with 129 additions and 144 deletions

View File

@ -1,31 +1,31 @@
---
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: API Reference title: API Reference
description: > description: >
# Introduction # Introduction
Jan API is compatible with the [OpenAI Jan API is compatible with the [OpenAI API](https://platform.openai.com/docs/api-reference).
API](https://platform.openai.com/docs/api-reference).
version: 0.1.8 version: 0.1.8
contact: contact:
name: Jan Discord name: Jan Discord
url: "https://discord.gg/7EcEz7MrvA" url: https://discord.gg/7EcEz7MrvA
license: license:
name: AGPLv3 name: AGPLv3
url: "https://github.com/janhq/nitro/blob/main/LICENSE" url: https://github.com/janhq/nitro/blob/main/LICENSE
servers: servers:
- url: "http://localhost:1337/v1/" - url: http://localhost:1337/v1/
tags: tags:
- name: Models - name: Models
description: List and describe the various models available in the API. description: List and describe the various models available in the API.
- name: Chat - name: Chat
description: > description: >
Given a list of messages comprising a conversation, the model will return Given a list of messages comprising a conversation, the model will
a response. return a response.
- name: Messages - name: Messages
description: > description: >
Messages capture a conversation's content. This can include the content Messages capture a conversation's content. This can include the
from LLM responses and other metadata from [chat content from LLM responses and other metadata from [chat
completions](/specs/chats). completions](/specs/chats).
- name: Threads - name: Threads
- name: Assistants - name: Assistants
@ -49,34 +49,37 @@ paths:
summary: | summary: |
Create chat completion Create chat completion
description: > description: >
Creates a model response for the given chat conversation. <a href = Creates a model response for the given chat conversation. <a href
"https://platform.openai.com/docs/api-reference/chat/create"> Equivalent = "https://platform.openai.com/docs/api-reference/chat/create">
to OpenAI's create chat completion. </a> Equivalent to OpenAI's create chat completion. </a>
requestBody: requestBody:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/chat.yaml#/components/schemas/ChatCompletionRequest" $ref: specs/chat.yaml#/components/schemas/ChatCompletionRequest
responses: responses:
"200": "200":
description: OK description: OK
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/chat.yaml#/components/schemas/ChatCompletionResponse" $ref: specs/chat.yaml#/components/schemas/ChatCompletionResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: > source: |
curl -X POST curl http://localhost:1337/v1/chat/completions \
'http://localhost:3982/inferences/llamacpp/chat_completion' \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
"llama_model_path": "/path/to/your/model.gguf", "model": "tinyllama-1.1b",
"messages": [ "messages": [
{ {
"role": "user", "role": "system",
"content": "hello" "content": "You are a helpful assistant."
}, },
{
"role": "user",
"content": "Hello!"
}
] ]
}' }'
/models: /models:
@ -86,17 +89,17 @@ paths:
- Models - Models
summary: List models summary: List models
description: > description: >
Lists the currently available models, and provides basic information Lists the currently available models, and provides basic
about each one such as the owner and availability. <a href = information about each one such as the owner and availability. <a href
"https://platform.openai.com/docs/api-reference/models/list"> Equivalent = "https://platform.openai.com/docs/api-reference/models/list">
to OpenAI's list model. </a> Equivalent to OpenAI's list model. </a>
responses: responses:
"200": "200":
description: OK description: OK
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/ListModelsResponse" $ref: specs/models.yaml#/components/schemas/ListModelsResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -114,7 +117,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/DownloadModelResponse" $ref: specs/models.yaml#/components/schemas/DownloadModelResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -126,8 +129,8 @@ paths:
- Models - Models
summary: Retrieve model summary: Retrieve model
description: > description: >
Get a model instance, providing basic information about the model such Get a model instance, providing basic information about the model
as the owner and permissioning. <a href = such as the owner and permissioning. <a href =
"https://platform.openai.com/docs/api-reference/models/retrieve"> "https://platform.openai.com/docs/api-reference/models/retrieve">
Equivalent to OpenAI's retrieve model. </a> Equivalent to OpenAI's retrieve model. </a>
parameters: parameters:
@ -145,7 +148,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/GetModelResponse" $ref: specs/models.yaml#/components/schemas/GetModelResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -174,7 +177,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/DeleteModelResponse" $ref: specs/models.yaml#/components/schemas/DeleteModelResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -202,7 +205,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/StartModelResponse" $ref: specs/models.yaml#/components/schemas/StartModelResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -229,7 +232,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/StopModelResponse" $ref: specs/models.yaml#/components/schemas/StopModelResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -255,14 +258,14 @@ paths:
type: array type: array
description: Initial set of messages for the thread. description: Initial set of messages for the thread.
items: items:
$ref: "specs/threads.yaml#/components/schemas/ThreadMessageObject" $ref: specs/threads.yaml#/components/schemas/ThreadMessageObject
responses: responses:
"200": "200":
description: Thread created successfully description: Thread created successfully
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/CreateThreadResponse" $ref: specs/threads.yaml#/components/schemas/CreateThreadResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -293,7 +296,7 @@ paths:
schema: schema:
type: array type: array
items: items:
$ref: "specs/threads.yaml#/components/schemas/ThreadObject" $ref: specs/threads.yaml#/components/schemas/ThreadObject
example: example:
- id: thread_abc123 - id: thread_abc123
object: thread object: thread
@ -340,7 +343,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/GetThreadResponse" $ref: specs/threads.yaml#/components/schemas/GetThreadResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -374,14 +377,14 @@ paths:
type: array type: array
description: Set of messages to update in the thread. description: Set of messages to update in the thread.
items: items:
$ref: "specs/threads.yaml#/components/schemas/ThreadMessageObject" $ref: specs/threads.yaml#/components/schemas/ThreadMessageObject
responses: responses:
"200": "200":
description: Thread modified successfully description: Thread modified successfully
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/ModifyThreadResponse" $ref: specs/threads.yaml#/components/schemas/ModifyThreadResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -421,7 +424,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/DeleteThreadResponse" $ref: specs/threads.yaml#/components/schemas/DeleteThreadResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -448,7 +451,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/GetThreadResponse" $ref: specs/threads.yaml#/components/schemas/GetThreadResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -484,7 +487,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/GetThreadResponse" $ref: specs/threads.yaml#/components/schemas/GetThreadResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -513,7 +516,7 @@ paths:
created_at: 1698984975 created_at: 1698984975
name: Math Tutor name: Math Tutor
description: null description: null
avatar: "https://pic.png" avatar: https://pic.png
models: models:
- model_id: model_0 - model_id: model_0
instructions: Be concise instructions: Be concise
@ -527,7 +530,7 @@ paths:
created_at: 1698984975 created_at: 1698984975
name: Physics Tutor name: Physics Tutor
description: null description: null
avatar: "https://pic.png" avatar: https://pic.png
models: models:
- model_id: model_1 - model_id: model_1
instructions: Be concise! instructions: Be concise!
@ -559,8 +562,7 @@ paths:
properties: properties:
models: models:
type: array type: array
description: >- description: List of models associated with the assistant. Jan-specific
List of models associated with the assistant. Jan-specific
property. property.
items: items:
type: object type: object
@ -574,8 +576,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: >- $ref: specs/assistants.yaml#/components/schemas/CreateAssistantResponse
specs/assistants.yaml#/components/schemas/CreateAssistantResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -613,8 +614,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: >- $ref: specs/assistants.yaml#/components/schemas/RetrieveAssistantResponse
specs/assistants.yaml#/components/schemas/RetrieveAssistantResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -647,8 +647,7 @@ paths:
properties: properties:
models: models:
type: array type: array
description: >- description: List of models associated with the assistant. Jan-specific
List of models associated with the assistant. Jan-specific
property. property.
items: items:
type: object type: object
@ -670,8 +669,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: >- $ref: specs/assistants.yaml#/components/schemas/ModifyAssistantResponse
specs/assistants.yaml#/components/schemas/ModifyAssistantResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -710,8 +708,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: >- $ref: specs/assistants.yaml#/components/schemas/DeleteAssistantResponse
specs/assistants.yaml#/components/schemas/DeleteAssistantResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -741,7 +738,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/ListMessagesResponse" $ref: specs/messages.yaml#/components/schemas/ListMessagesResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -794,7 +791,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/CreateMessageResponse" $ref: specs/messages.yaml#/components/schemas/CreateMessageResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: | source: |
@ -838,12 +835,12 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/GetMessageResponse" $ref: specs/messages.yaml#/components/schemas/GetMessageResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: > source: >
curl curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}
http://localhost:1337/v1/threads/{thread_id}/messages/{message_id} \ \
-H "Content-Type: application/json" -H "Content-Type: application/json"
"/threads/{thread_id}/messages/{message_id}/files": "/threads/{thread_id}/messages/{message_id}/files":
get: get:
@ -879,8 +876,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: >- $ref: specs/messages.yaml#/components/schemas/ListMessageFilesResponse
specs/messages.yaml#/components/schemas/ListMessageFilesResponse
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: > source: >
@ -895,8 +891,8 @@ paths:
- Messages - Messages
summary: Retrieve message file summary: Retrieve message file
description: > description: >
Retrieves a file associated with a specific message in a thread. <a Retrieves a file associated with a specific message in a
href = thread. <a href =
"https://platform.openai.com/docs/api-reference/messages/getMessageFile"> "https://platform.openai.com/docs/api-reference/messages/getMessageFile">
Equivalent to OpenAI's retrieve message file. </a> Equivalent to OpenAI's retrieve message file. </a>
parameters: parameters:
@ -930,7 +926,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/MessageFileObject" $ref: specs/messages.yaml#/components/schemas/MessageFileObject
x-codeSamples: x-codeSamples:
- lang: cURL - lang: cURL
source: > source: >
@ -953,14 +949,15 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/ModelObject" $ref: specs/models.yaml#/components/schemas/ModelObject
AssistantObject: AssistantObject:
post: post:
summary: The assistant object summary: The assistant object
description: > description: >
Build assistants that can call models and use tools to perform tasks. Build assistants that can call models and use tools to perform
<a href = "https://platform.openai.com/docs/api-reference/assistants"> tasks. <a href =
Equivalent to OpenAI's assistants object. </a> "https://platform.openai.com/docs/api-reference/assistants"> Equivalent
to OpenAI's assistants object. </a>
operationId: AssistantObjects operationId: AssistantObjects
tags: tags:
- Assistants - Assistants
@ -968,7 +965,7 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/assistants.yaml#/components/schemas/AssistantObject" $ref: specs/assistants.yaml#/components/schemas/AssistantObject
MessageObject: MessageObject:
post: post:
summary: The message object summary: The message object
@ -983,12 +980,11 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/MessageObject" $ref: specs/messages.yaml#/components/schemas/MessageObject
ThreadObject: ThreadObject:
post: post:
summary: The thread object summary: The thread object
description: >- description: Represents a thread that contains messages. <a href =
Represents a thread that contains messages. <a href =
"https://platform.openai.com/docs/api-reference/threads/object"> "https://platform.openai.com/docs/api-reference/threads/object">
Equivalent to OpenAI's thread object. </a> Equivalent to OpenAI's thread object. </a>
operationId: ThreadObject operationId: ThreadObject
@ -998,4 +994,4 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/ThreadObject" $ref: specs/threads.yaml#/components/schemas/ThreadObject

View File

@ -1,3 +1,4 @@
---
components: components:
schemas: schemas:
AssistantObject: AssistantObject:
@ -9,7 +10,7 @@ components:
example: asst_abc123 example: asst_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's an assistant." description: Type of the object, indicating it's an assistant.
default: assistant default: assistant
version: version:
type: integer type: integer
@ -31,7 +32,7 @@ components:
avatar: avatar:
type: string type: string
description: URL of the assistant's avatar. Jan-specific property. description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png" example: https://pic.png
models: models:
type: array type: array
description: List of models associated with the assistant. Jan-specific property. description: List of models associated with the assistant. Jan-specific property.
@ -70,7 +71,7 @@ components:
example: asst_abc123 example: asst_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's an assistant." description: Type of the object, indicating it's an assistant.
default: assistant default: assistant
version: version:
type: integer type: integer
@ -92,7 +93,7 @@ components:
avatar: avatar:
type: string type: string
description: URL of the assistant's avatar. Jan-specific property. description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png" example: https://pic.png
models: models:
type: array type: array
description: List of models associated with the assistant. Jan-specific property. description: List of models associated with the assistant. Jan-specific property.
@ -130,7 +131,7 @@ components:
example: asst_abc123 example: asst_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's an assistant." description: Type of the object, indicating it's an assistant.
default: assistant default: assistant
version: version:
type: integer type: integer
@ -152,7 +153,7 @@ components:
avatar: avatar:
type: string type: string
description: URL of the assistant's avatar. Jan-specific property. description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png" example: https://pic.png
models: models:
type: array type: array
description: List of models associated with the assistant. Jan-specific property. description: List of models associated with the assistant. Jan-specific property.
@ -190,7 +191,7 @@ components:
example: asst_abc123 example: asst_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's an assistant." description: Type of the object, indicating it's an assistant.
default: assistant default: assistant
version: version:
type: integer type: integer
@ -212,7 +213,7 @@ components:
avatar: avatar:
type: string type: string
description: URL of the assistant's avatar. Jan-specific property. description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png" example: https://pic.png
models: models:
type: array type: array
description: List of models associated with the assistant. Jan-specific property. description: List of models associated with the assistant. Jan-specific property.
@ -250,7 +251,7 @@ components:
example: asst_abc123 example: asst_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's an assistant." description: Type of the object, indicating it's an assistant.
default: assistant default: assistant
version: version:
type: integer type: integer
@ -272,7 +273,7 @@ components:
avatar: avatar:
type: string type: string
description: URL of the assistant's avatar. Jan-specific property. description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png" example: https://pic.png
models: models:
type: array type: array
description: List of models associated with the assistant. Jan-specific property. description: List of models associated with the assistant. Jan-specific property.
@ -310,7 +311,7 @@ components:
example: asst_abc123 example: asst_abc123
object: object:
type: string type: string
description: "Type of the object, indicating the assistant has been deleted." description: Type of the object, indicating the assistant has been deleted.
example: assistant.deleted example: assistant.deleted
deleted: deleted:
type: boolean type: boolean

View File

@ -1,3 +1,4 @@
---
components: components:
schemas: schemas:
ChatObject: ChatObject:
@ -15,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
@ -25,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
@ -71,13 +67,13 @@ components:
description: | description: |
Contains input data or prompts for the model to process. Contains input data or prompts for the model to process.
example: example:
- content: "Hello there :wave:" - content: You are a helpful assistant.
role: assistant role: system
- content: Can you write a long story - content: Hello!
role: user role: user
model: model:
type: string type: string
example: model-zephyr-7B example: tinyllama-1.1b
description: | description: |
Specifies the model being used for inference or processing tasks. Specifies the model being used for inference or processing tasks.
stream: stream:
@ -139,7 +135,7 @@ components:
type: string type: string
nullable: true nullable: true
example: null example: null
description: "Reason for finishing the response, if applicable" description: Reason for finishing the response, if applicable
index: index:
type: integer type: integer
example: 0 example: 0

View File

@ -1,3 +1,4 @@
---
components: components:
schemas: schemas:
ListModelsResponse: ListModelsResponse:
@ -27,8 +28,7 @@ components:
description: The version number of the model. description: The version number of the model.
id: id:
type: string type: string
description: >- description: Unique identifier used in chat-completions model_name, matches
Unique identifier used in chat-completions model_name, matches
folder name. folder name.
example: zephyr-7b example: zephyr-7b
name: name:
@ -57,14 +57,13 @@ components:
description: Current state of the model. description: Current state of the model.
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.
example: ggufv3 example: ggufv3
source_url: source_url:
type: string type: string
format: uri format: uri
description: URL to the source of the model. description: URL to the source of the model.
example: >- example: https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf
https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf
settings: settings:
type: object type: object
properties: properties:
@ -152,7 +151,7 @@ components:
example: zephyr-7b example: zephyr-7b
object: object:
type: string type: string
description: "Type of the object, indicating it's a model." description: Type of the object, indicating it's a model.
default: model default: model
created: created:
type: integer type: integer
@ -174,8 +173,7 @@ components:
type: string type: string
format: uri format: uri
description: URL to the source of the model. description: URL to the source of the model.
example: >- example: https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf
https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf
engine_parameters: engine_parameters:
type: object type: object
properties: properties:
@ -198,8 +196,7 @@ components:
default: "ASSISTANT: " default: "ASSISTANT: "
ngl: ngl:
type: integer type: integer
description: >- description: Number of neural network layers loaded onto the GPU for
Number of neural network layers loaded onto the GPU for
acceleration. acceleration.
minimum: 0 minimum: 0
maximum: 100 maximum: 100
@ -207,18 +204,16 @@ components:
example: 100 example: 100
ctx_len: ctx_len:
type: integer type: integer
description: >- description: Context length for model operations, varies based on the specific
Context length for model operations, varies based on the model.
specific model.
minimum: 128 minimum: 128
maximum: 4096 maximum: 4096
default: 2048 default: 2048
example: 2048 example: 2048
n_parallel: n_parallel:
type: integer type: integer
description: >- description: Number of parallel operations, relevant when continuous batching is
Number of parallel operations, relevant when continuous batching enabled.
is enabled.
minimum: 1 minimum: 1
maximum: 10 maximum: 10
default: 1 default: 1
@ -269,8 +264,7 @@ components:
example: 4 example: 4
temperature: temperature:
type: number type: number
description: >- description: Controls randomness in model's responses. Higher values lead to
Controls randomness in model's responses. Higher values lead to
more random responses. more random responses.
minimum: 0 minimum: 0
maximum: 2 maximum: 2
@ -278,8 +272,7 @@ components:
example: 0.7 example: 0.7
token_limit: token_limit:
type: integer type: integer
description: >- description: Maximum number of tokens the model can generate in a single
Maximum number of tokens the model can generate in a single
response. response.
minimum: 1 minimum: 1
maximum: 4096 maximum: 4096
@ -287,18 +280,16 @@ components:
example: 2048 example: 2048
top_k: top_k:
type: integer type: integer
description: >- description: Limits the model to consider only the top k most likely next tokens
Limits the model to consider only the top k most likely next at each step.
tokens at each step.
minimum: 0 minimum: 0
maximum: 100 maximum: 100
default: 0 default: 0
example: 0 example: 0
top_p: top_p:
type: number type: number
description: >- description: Nucleus sampling parameter. The model considers the smallest set of
Nucleus sampling parameter. The model considers the smallest set tokens whose cumulative probability exceeds the top_p value.
of tokens whose cumulative probability exceeds the top_p value.
minimum: 0 minimum: 0
maximum: 1 maximum: 1
default: 1 default: 1

View File

@ -1,3 +1,4 @@
---
components: components:
schemas: schemas:
ThreadObject: ThreadObject:
@ -39,13 +40,13 @@ components:
settings: settings:
type: object type: object
description: > description: >
Defaults to and overrides assistant.json's "settings" (and Defaults to and overrides assistant.json's "settings" (and if none,
if none, then model.json "settings") then model.json "settings")
parameters: parameters:
type: object type: object
description: > description: >
Defaults to and overrides assistant.json's "parameters" Defaults to and overrides assistant.json's "parameters" (and if
(and if none, then model.json "parameters") none, then model.json "parameters")
created: created:
type: integer type: integer
format: int64 format: int64
@ -141,7 +142,7 @@ components:
example: thread_abc123 example: thread_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's a thread." description: Type of the object, indicating it's a thread.
example: thread example: thread
created_at: created_at:
type: integer type: integer
@ -161,7 +162,7 @@ components:
example: thread_abc123 example: thread_abc123
object: object:
type: string type: string
description: "Type of the object, indicating the thread has been deleted." description: Type of the object, indicating the thread has been deleted.
example: thread.deleted example: thread.deleted
deleted: deleted:
type: boolean type: boolean