docs: new version API reference

This commit is contained in:
hieu-jan 2023-11-30 10:27:04 +09:00
parent cd32b09b2c
commit fc9ce395f6
7 changed files with 105 additions and 154 deletions

View File

@ -23,19 +23,7 @@ tags:
- name: Messages - name: Messages
description: | description: |
Messages capture a conversation's content. This can include the content from LLM responses and other metadata from [chat completions](/specs/chats). Messages capture a conversation's content. This can include the content from LLM responses and other metadata from [chat completions](/specs/chats).
- Users and assistants can send multimedia messages.
- An [OpenAI Message API](https://platform.openai.com/docs/api-reference/messages) compatible endpoint at `localhost:1337/v1/messages`.
- Jan's `messages` API is compatible with [OpenAI's Messages API](https://platform.openai.com/docs/api-reference/messages), with additional methods for managing messages locally.
- name: Threads - name: Threads
description: |
Threads are conversations between an `assistant` and the user:
- Users can tweak `model` params and `assistant` behavior within each thread.
- Users can import and export threads.
- An [OpenAI Thread API](https://platform.openai.com/docs/api-reference/threads) compatible endpoint at `localhost:1337/v1/threads`.
- name: Assistants - name: Assistants
description: Configures and utilizes different AI assistants for varied tasks description: Configures and utilizes different AI assistants for varied tasks
x-tagGroups: x-tagGroups:
@ -54,12 +42,10 @@ paths:
operationId: createChatCompletion operationId: createChatCompletion
tags: tags:
- Chat - Chat
summary: Create chat completion summary: |
Create chat completion
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/chat/create"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Creates a model response for the given chat conversation. <a href = "https://platform.openai.com/docs/api-reference/chat/create"> Equivalent to OpenAI's create chat completion. </a>
and <span style = "color: #fec928"> Jan </span>
Creates a model response for the given chat conversation.
requestBody: requestBody:
content: content:
application/json: application/json:
@ -93,12 +79,9 @@ paths:
operationId: listModels operationId: listModels
tags: tags:
- Models - Models
summary: List models summary: List models
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/models/list"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Lists the currently available models, and provides basic information about each one such as the owner and availability. <a href = "https://platform.openai.com/docs/api-reference/models/list"> Equivalent to OpenAI's list model. </a>
Lists the currently available models, and provides basic information about each one such as the owner and availability.
responses: responses:
"200": "200":
description: OK description: OK
@ -116,8 +99,6 @@ paths:
- Models - Models
summary: Download model summary: Download model
description: | description: |
<span style = "color: #fec928"> Jan </span>
Download a model. Download a model.
responses: responses:
"200": "200":
@ -137,9 +118,7 @@ paths:
- Models - Models
summary: Retrieve model summary: Retrieve model
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/models/retrieve"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Get a model instance, providing basic information about the model such as the owner and permissioning. <a href = "https://platform.openai.com/docs/api-reference/models/retrieve"> Equivalent to OpenAI's retrieve model. </a>
Get a model instance, providing basic information about the model such as the owner and permissioning.
parameters: parameters:
- in: path - in: path
name: model_id name: model_id
@ -150,8 +129,6 @@ paths:
example: zephyr-7b example: zephyr-7b
description: | description: |
The ID of the model to use for this request The ID of the model to use for this request
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: OK description: OK
@ -169,9 +146,7 @@ paths:
- Models - Models
summary: Delete model summary: Delete model
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/models/delete"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Delete a model. <a href = "https://platform.openai.com/docs/api-reference/models/delete"> Equivalent to OpenAI's delete model. </a>
Delete a model.
parameters: parameters:
- in: path - in: path
name: model name: model
@ -181,8 +156,6 @@ paths:
example: zephyr-7b example: zephyr-7b
description: | description: |
The model to delete The model to delete
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: OK description: OK
@ -201,8 +174,6 @@ paths:
- Models - Models
summary: Start model summary: Start model
description: | description: |
<span style = "color: #fec928"> Jan </span>
Starts an imported model. Loads the model into V/RAM. Starts an imported model. Loads the model into V/RAM.
parameters: parameters:
- in: path - in: path
@ -232,8 +203,6 @@ paths:
- Models - Models
summary: Stop model summary: Stop model
description: | description: |
<span style = "color: #fec928"> Jan </span>
Stop an imported model. Stop an imported model.
parameters: parameters:
- in: path - in: path
@ -264,9 +233,7 @@ paths:
- Threads - Threads
summary: Create thread summary: Create thread
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/threads/createThread"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Create a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/createThread"> Equivalent to OpenAI's create thread. </a>
Create a thread
requestBody: requestBody:
required: false required: false
content: content:
@ -307,8 +274,6 @@ paths:
- Threads - Threads
summary: List threads summary: List threads
description: | description: |
<span style = "color: #fec928"> Jan </span>
Retrieves a list of all threads available in the system. Retrieves a list of all threads available in the system.
responses: responses:
"200": "200":
@ -344,9 +309,7 @@ paths:
- Threads - Threads
summary: Retrieve thread summary: Retrieve thread
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/threads/getThread"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Retrieves detailed information about a specific thread using its thread_id. <a href = "https://platform.openai.com/docs/api-reference/threads/getThread"> Equivalent to OpenAI's retrieve thread. </a>
Retrieves detailed information about a specific thread using its thread_id.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -357,7 +320,6 @@ paths:
description: | description: |
The ID of the thread to retrieve. The ID of the thread to retrieve.
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: Thread details retrieved successfully description: Thread details retrieved successfully
@ -375,9 +337,7 @@ paths:
- Threads - Threads
summary: Modify thread summary: Modify thread
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/threads/modifyThread"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Modifies a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/modifyThread"> Equivalent to OpenAI's modify thread. </a>
Modifies a thread
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -388,7 +348,6 @@ paths:
description: | description: |
The ID of the thread to be modified. The ID of the thread to be modified.
<span style="color:#0ca47c">OpenAI compatible</span>
requestBody: requestBody:
required: false required: false
content: content:
@ -430,9 +389,7 @@ paths:
- Threads - Threads
summary: Delete thread summary: Delete thread
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/threads/deleteThread"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Delete a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/deleteThread"> Equivalent to OpenAI's delete thread. </a>
Delete a thread
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -443,7 +400,6 @@ paths:
description: | description: |
The ID of the thread to be deleted. The ID of the thread to be deleted.
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: Thread deleted successfully description: Thread deleted successfully
@ -464,7 +420,7 @@ paths:
- Threads - Threads
summary: Get Thread.Assistants summary: Get Thread.Assistants
description: | description: |
<span style = "color: #fec928"> Jan </span>
Can achieve this goal by calling Get thread API Can achieve this goal by calling Get thread API
parameters: parameters:
@ -494,7 +450,7 @@ paths:
- Threads - Threads
summary: Modify Thread.Assistants summary: Modify Thread.Assistants
description: | description: |
<span style = "color: #fec928"> Jan </span>
Can achieve this goal by calling Modify Assistant API with thread.assistant[] Can achieve this goal by calling Modify Assistant API with thread.assistant[]
@ -505,7 +461,7 @@ paths:
- Threads - Threads
summary: List Thread.Messages summary: List Thread.Messages
description: | description: |
<span style = "color: #fec928"> Jan </span>
Can achieve this goal by calling Get Thread API Can achieve this goal by calling Get Thread API
parameters: parameters:
@ -536,9 +492,7 @@ paths:
- Messages - Messages
summary: List messages summary: List messages
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Retrieves all messages from the given thread. <a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> Equivalent to OpenAI's list messages. </a>
Retrieves all messages from the given thread.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -549,7 +503,6 @@ paths:
description: | description: |
The ID of the thread from which to retrieve messages. The ID of the thread from which to retrieve messages.
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: List of messages retrieved successfully description: List of messages retrieved successfully
@ -568,9 +521,7 @@ paths:
- Messages - Messages
summary: Create message summary: Create message
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/createMessage"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Create a message. <a href = "https://platform.openai.com/docs/api-reference/messages/createMessage"> Equivalent to OpenAI's list messages. </a>
Create a message
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -581,7 +532,6 @@ paths:
description: | description: |
The ID of the thread to which the message will be posted. The ID of the thread to which the message will be posted.
<span style="color:#0ca47c">OpenAI compatible</span>
requestBody: requestBody:
required: true required: true
content: content:
@ -594,7 +544,7 @@ paths:
description: | description: |
"Role of the sender, either 'user' or 'assistant'." "Role of the sender, either 'user' or 'assistant'."
<span style="color:#0ca47c">OpenAI compatible</span> <span style="color:#228B22">OpenAI compatible</span>
example: "user" example: "user"
enum: ["user", "assistant"] enum: ["user", "assistant"]
content: content:
@ -602,7 +552,7 @@ paths:
description: | description: |
"Text content of the message." "Text content of the message."
<span style="color:#0ca47c">OpenAI compatible</span> <span style="color:#228B22">OpenAI compatible</span>
example: "How does AI work? Explain it in simple terms." example: "How does AI work? Explain it in simple terms."
required: required:
- role - role
@ -631,9 +581,7 @@ paths:
- Messages - Messages
summary: Retrieve message summary: Retrieve message
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/getMessage"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Retrieve a specific message from a thread using its thread_id and message_id. <a href = "https://platform.openai.com/docs/api-reference/messages/getMessage"> Equivalent to OpenAI's retrieve messages. </a>
Retrieve a specific message from a thread using its thread_id and message_id.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -644,7 +592,6 @@ paths:
description: | description: |
The ID of the thread containing the message. The ID of the thread containing the message.
<span style="color:#0ca47c">OpenAI compatible</span>
- in: path - in: path
name: message_id name: message_id
required: true required: true
@ -654,7 +601,6 @@ paths:
description: | description: |
The ID of the message to retrieve. The ID of the message to retrieve.
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: OK description: OK
@ -673,11 +619,10 @@ paths:
operationId: listMessageFiles operationId: listMessageFiles
tags: tags:
- Messages - Messages
summary: List message files summary: |
List message files
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessageFiles"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Returns a list of message files. <a href = "https://platform.openai.com/docs/api-reference/messages/listMessageFiles"> Equivalent to OpenAI's list message files. </a>
Returns a list of message files.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -688,7 +633,6 @@ paths:
description: | description: |
The ID of the thread containing the message. The ID of the thread containing the message.
<span style="color:#0ca47c">OpenAI compatible</span>
- in: path - in: path
name: message_id name: message_id
required: true required: true
@ -698,7 +642,6 @@ paths:
description: | description: |
The ID of the message whose files are to be listed. The ID of the message whose files are to be listed.
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: List of files retrieved successfully description: List of files retrieved successfully
@ -719,9 +662,7 @@ paths:
- Messages - Messages
summary: Retrieve message file summary: Retrieve message file
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/getMessageFile"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Retrieves a file associated with a specific message in a thread. <a href = "https://platform.openai.com/docs/api-reference/messages/getMessageFile"> Equivalent to OpenAI's retrieve message file. </a>
Retrieves a file associated with a specific message in a thread.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -732,7 +673,6 @@ paths:
description: | description: |
The ID of the thread containing the message. The ID of the thread containing the message.
<span style="color:#0ca47c">OpenAI compatible</span>
- in: path - in: path
name: message_id name: message_id
required: true required: true
@ -742,7 +682,6 @@ paths:
description: | description: |
The ID of the message associated with the file. The ID of the message associated with the file.
<span style="color:#0ca47c">OpenAI compatible</span>
- in: path - in: path
name: file_id name: file_id
required: true required: true
@ -752,7 +691,6 @@ paths:
description: | description: |
The ID of the file to retrieve. The ID of the file to retrieve.
<span style="color:#0ca47c">OpenAI compatible</span>
responses: responses:
"200": "200":
description: File retrieved successfully description: File retrieved successfully
@ -771,11 +709,7 @@ x-webhooks:
post: post:
summary: The model object summary: The model object
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/models/object"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Describe a model offering that can be used with the API. <a href = "https://platform.openai.com/docs/api-reference/models/object"> Equivalent to OpenAI's model object. </a>
Describe a model offering that can be used with the API.
operationId: ModelObject operationId: ModelObject
tags: tags:
- Models - Models
@ -784,14 +718,11 @@ x-webhooks:
application/json: application/json:
schema: schema:
$ref: 'specs/models.yaml#/components/schemas/ModelObject' $ref: 'specs/models.yaml#/components/schemas/ModelObject'
MessageObject: MessageObject:
post: post:
summary: The message object summary: The message object
description: | description: |
<a href = "https://platform.openai.com/docs/api-reference/messages/object"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> Information about a message in the thread. <a href = "https://platform.openai.com/docs/api-reference/messages/object"> Equivalent to OpenAI's message object. </a>
Information about a message in the thread
operationId: MessageObject operationId: MessageObject
tags: tags:
- Messages - Messages
@ -800,19 +731,10 @@ x-webhooks:
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 = "https://platform.openai.com/docs/api-reference/threads/object"> Equivalent to OpenAI's thread object. </a>
<a href = "https://platform.openai.com/docs/api-reference/threads/object"> <button style = "color: #0ca47c"> OpenAI compatible </button></a> and <span style = "color: #fec928"> Jan </span>
Each `thread` folder contains a `thread.json` file, which is a representation of a thread.
`thread.json` contains metadata and model parameter overrides.
There are no required fields.
operationId: ThreadObject operationId: ThreadObject
tags: tags:
- Threads - Threads

View File

@ -0,0 +1,59 @@
AssistantObject:
type: object
properties:
avatar:
type: string
description: "URL of the assistant's avatar. Jan-specific property."
example: "https://lala.png"
id:
type: string
description: "The identifier of the assistant."
example: "asst_abc123"
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: "assistant"
version:
type: integer
description: "Version number of the assistant."
example: 1
created_at:
type: integer
format: int64
description: "Unix timestamp representing the creation time of the assistant."
name:
type: string
description: "Name of the assistant."
example: "Math Tutor"
description:
type: string
description: "Description of the assistant. Can be null."
models:
type: array
description: "List of models associated with the assistant. Jan-specific property."
items:
type: object
properties:
model_id:
type: string
# Additional properties for models can be added here
events:
type: object
description: "Event subscription settings for the assistant."
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
# If there are specific event types, they can be detailed here
metadata:
type: object
description: "Metadata associated with the assistant."
required:
- name
- models
- events

View File

@ -59,8 +59,6 @@ components:
type: arrays type: arrays
description: | description: |
Contains input data or prompts for the model to process Contains input data or prompts for the model to process
<span style="color:#0ca47c">OpenAI compatible</span>
example: example:
[ [
{ "content": "Hello there :wave:", "role": "assistant" }, { "content": "Hello there :wave:", "role": "assistant" },
@ -71,43 +69,31 @@ components:
example: model-zephyr-7B example: model-zephyr-7B
description: | description: |
Specifies the model being used for inference or processing tasks Specifies the model being used for inference or processing tasks
<span style="color:#0ca47c">OpenAI compatible</span>
stream: stream:
type: boolean type: boolean
default: true default: true
description: | description: |
Enables continuous output generation, allowing for streaming of model responses Enables continuous output generation, allowing for streaming of model responses
<span style="color:#0ca47c">OpenAI compatible</span>
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 response The maximum number of tokens the model will generate in a single response
<span style="color:#0ca47c">OpenAI compatible</span>
stop: stop:
type: arrays type: arrays
example: ["hello"] example: ["hello"]
description: | description: |
Defines specific tokens or phrases at which the model will stop generating further output Defines specific tokens or phrases at which the model will stop generating further output
<span style="color:#0ca47c">OpenAI compatible</span>
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 its output Adjusts the likelihood of the model repeating words or phrases in its output
<span style="color:#0ca47c">OpenAI compatible</span>
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 output Influences the generation of new and varied concepts in the model's output
<span style="color:#0ca47c">OpenAI compatible</span>
temperature: temperature:
type: number type: number
default: 0.7 default: 0.7
@ -115,8 +101,6 @@ components:
max: 1 max: 1
description: | description: |
Controls the randomness of the model's output Controls the randomness of the model's output
<span style="color:#0ca47c">OpenAI compatible</span>
top_p: top_p:
type: number type: number
default: 0.95 default: 0.95
@ -125,7 +109,7 @@ components:
description: | description: |
Set probability threshold for more relevant outputs Set probability threshold for more relevant outputs
<span style="color:#0ca47c">OpenAI compatible</span>
ChatCompletionResponse: ChatCompletionResponse:
type: object type: object

View File

@ -7,36 +7,26 @@ components:
type: string type: string
description: | description: |
"Sequential or UUID identifier of the message." "Sequential or UUID identifier of the message."
<span style="color:#0ca47c">OpenAI compatible</span>
example: 0 example: 0
object: object:
type: string type: string
description: | description: |
"Type of the object, defaults to 'thread.message'." "Type of the object, defaults to 'thread.message'."
<span style="color:#0ca47c">OpenAI compatible</span>
example: thread.message example: thread.message
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: | description: |
"Unix timestamp representing the creation time of the message." "Unix timestamp representing the creation time of the message."
<span style="color:#0ca47c">OpenAI compatible</span>
thread_id: thread_id:
type: string type: string
description: | description: |
"Identifier of the thread to which this message belongs. Defaults to parent thread." "Identifier of the thread to which this message belongs. Defaults to parent thread."
<span style="color:#0ca47c">OpenAI compatible</span>
example: "thread_asdf" example: "thread_asdf"
assistant_id: assistant_id:
type: string type: string
description: | description: |
"Identifier of the assistant involved in the message. Defaults to parent thread." "Identifier of the assistant involved in the message. Defaults to parent thread."
<span style="color:#0ca47c">OpenAI compatible</span>
example: jan example: jan
role: role:
type: string type: string
@ -44,7 +34,6 @@ components:
description: | description: |
"Role of the sender, either 'user' or 'assistant'." "Role of the sender, either 'user' or 'assistant'."
<span style="color:#0ca47c">OpenAI compatible</span>
content: content:
type: array type: array
items: items:
@ -55,7 +44,7 @@ components:
description: | description: |
"Type of content, e.g., 'text'." "Type of content, e.g., 'text'."
<span style="color:#0ca47c">OpenAI compatible</span>
text: text:
type: object type: object
properties: properties:
@ -63,8 +52,6 @@ components:
type: string type: string
description: | description: |
"Text content of the message." "Text content of the message."
<span style="color:#0ca47c">OpenAI compatible</span>
example: "Hi!?" example: "Hi!?"
annotations: annotations:
type: array type: array
@ -72,15 +59,12 @@ components:
type: string type: string
description: | description: |
"Annotations for the text content, if any." "Annotations for the text content, if any."
<span style="color:#0ca47c">OpenAI compatible</span>
example: [] example: []
metadata: metadata:
type: object type: object
description: | description: |
"Metadata associated with the message, defaults to an empty object." "Metadata associated with the message, defaults to an empty object."
<span style="color:#0ca47c">OpenAI compatible</span>
example: {} example: {}
GetMessageResponse: GetMessageResponse:

View File

@ -120,14 +120,12 @@ components:
description: | description: |
"The identifier of the model." "The identifier of the model."
<span style="color:#0ca47c">OpenAI compatible</span>
example: "zephyr-7b" example: "zephyr-7b"
object: object:
type: string type: string
description: | description: |
"The type of the object, indicating it's a model." "The type of the object, indicating it's a model."
<span style="color:#0ca47c">OpenAI compatible</span>
default: "model" default: "model"
created: created:
type: integer type: integer
@ -135,14 +133,12 @@ components:
description: | description: |
"Unix timestamp representing the creation time of the model." "Unix timestamp representing the creation time of the model."
<span style="color:#0ca47c">OpenAI compatible</span>
example: "1253935178" example: "1253935178"
owned_by: owned_by:
type: string type: string
description: | description: |
"The entity that owns the model." "The entity that owns the model."
<span style="color:#0ca47c">OpenAI compatible</span>
example: "_" example: "_"
GetModelResponse: GetModelResponse:

View File

@ -8,26 +8,24 @@ components:
description: | description: |
"The identifier of the thread, defaults to foldername." "The identifier of the thread, defaults to foldername."
<span style="color:#0ca47c">OpenAI compatible</span>
example: thread_.... example: thread_....
object: object:
type: string type: string
description: | description: |
"Type of the object, defaults to thread." "Type of the object, defaults to thread."
<span style="color:#0ca47c">OpenAI compatible</span>
example: thread example: thread
title: title:
type: string type: string
description: | description: |
"A brief summary or description of the thread, defaults to an empty string." "A brief summary or description of the thread, defaults to an empty string."
<span style = "color: #fec928"> Jan </span>
example: "funny physics joke" example: "funny physics joke"
assistants: assistants:
type: array type: array
description: | description: |
<span style = "color: #fec928"> Jan </span>
items: items:
properties: properties:
assistant_id: assistant_id:
@ -35,7 +33,7 @@ components:
description: | description: |
The identifier of assistant, defaults to "jan" The identifier of assistant, defaults to "jan"
<span style = "color: #fec928"> Jan </span>
example: jan example: jan
model: model:
type: object type: object
@ -43,34 +41,32 @@ components:
id: id:
type: string type: string
description: | description: |
<span style = "color: #fec928"> Jan </span>
example: ... example: ...
settings: settings:
type: object type: object
description: | description: |
Defaults to and overrides assistant.json's "settings" (and if none, then model.json "settings") Defaults to and overrides assistant.json's "settings" (and if none, then model.json "settings")
<span style = "color: #fec928"> Jan </span>
parameters: parameters:
type: object type: object
description: | description: |
Defaults to and overrides assistant.json's "parameters" (and if none, then model.json "parameters") Defaults to and overrides assistant.json's "parameters" (and if none, then model.json "parameters")
<span style = "color: #fec928"> Jan </span>
created: created:
type: integer type: integer
format: int64 format: int64
description: | description: |
"Unix timestamp representing the creation time of the thread, defaults to file creation time." "Unix timestamp representing the creation time of the thread, defaults to file creation time."
<span style="color:#0ca47c">OpenAI compatible</span>
example: 1231231 example: 1231231
metadata: metadata:
type: object type: object
description: | description: |
"Metadata associated with the thread, defaults to an empty object." "Metadata associated with the thread, defaults to an empty object."
<span style="color:#0ca47c">OpenAI compatible</span>
example: {} example: {}
GetThreadResponse: GetThreadResponse:
@ -135,14 +131,12 @@ components:
description: | description: |
"Role of the sender, either 'user' or 'assistant'." "Role of the sender, either 'user' or 'assistant'."
<span style="color:#0ca47c">OpenAI compatible</span>
enum: ["user", "assistant"] enum: ["user", "assistant"]
content: content:
type: string type: string
description: | description: |
"Text content of the message." "Text content of the message."
<span style="color:#0ca47c">OpenAI compatible</span>
file_ids: file_ids:
type: array type: array
items: items:
@ -150,7 +144,6 @@ components:
description: | description: |
"Array of file IDs associated with the message, if any." "Array of file IDs associated with the message, if any."
<span style="color:#0ca47c">OpenAI compatible</span>
ModifyThreadResponse: ModifyThreadResponse:
type: object type: object

View File

@ -1,4 +1,5 @@
@layer base { @layer base {
html[data-theme="light"] { html[data-theme="light"] {
--ifm-background-color: white; --ifm-background-color: white;
--ifm-color-primary: #2563eb; /* New Primary Blue */ --ifm-color-primary: #2563eb; /* New Primary Blue */
@ -39,4 +40,16 @@
text-decoration: none; text-decoration: none;
} }
} }
compatible-label {
display: inline-block;
padding: 2px 8px;
margin: 0;
background-color: #228B22;
color: #000;
font-size: 13px;
vertical-align: middle;
line-height: 1.6;
border-radius: 4px;
font-weight: var(--ifm-font-weight-bold);
}
} }