commit
df977143ec
@ -117,7 +117,6 @@ const config = {
|
|||||||
requiredPropsFirst: true,
|
requiredPropsFirst: true,
|
||||||
noAutoAuth: true,
|
noAutoAuth: true,
|
||||||
hideDownloadButton: true,
|
hideDownloadButton: true,
|
||||||
disableSearch: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,28 +1,32 @@
|
|||||||
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 API](https://platform.openai.com/docs/api-reference).
|
|
||||||
version: "0.1.8"
|
Jan API is compatible with the [OpenAI
|
||||||
|
API](https://platform.openai.com/docs/api-reference).
|
||||||
|
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: https://localhost:1337/v1/
|
- url: "https://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 a response.
|
Given a list of messages comprising a conversation, the model will return
|
||||||
|
a response.
|
||||||
- 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).
|
||||||
- name: Threads
|
- name: 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
|
||||||
@ -44,8 +48,10 @@ paths:
|
|||||||
- Chat
|
- Chat
|
||||||
summary: |
|
summary: |
|
||||||
Create chat completion
|
Create chat completion
|
||||||
description: |
|
description: >
|
||||||
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>
|
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>
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -59,9 +65,10 @@ paths:
|
|||||||
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 'http://localhost:3982/inferences/llamacpp/chat_completion' \
|
curl -X POST
|
||||||
|
'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",
|
"llama_model_path": "/path/to/your/model.gguf",
|
||||||
@ -72,16 +79,17 @@ paths:
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
|
|
||||||
### MODELS
|
|
||||||
/models:
|
/models:
|
||||||
get:
|
get:
|
||||||
operationId: listModels
|
operationId: listModels
|
||||||
tags:
|
tags:
|
||||||
- Models
|
- Models
|
||||||
summary: List models
|
summary: List models
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/models/list"> Equivalent
|
||||||
|
to OpenAI's list model. </a>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -90,7 +98,7 @@ paths:
|
|||||||
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: |
|
||||||
curl https://localhost:1337/v1/models
|
curl https://localhost:1337/v1/models
|
||||||
post:
|
post:
|
||||||
@ -108,27 +116,29 @@ paths:
|
|||||||
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: |
|
||||||
curl -X POST https://localhost:1337/v1/models
|
curl -X POST https://localhost:1337/v1/models
|
||||||
/models/{model_id}:
|
"/models/{model_id}":
|
||||||
get:
|
get:
|
||||||
operationId: retrieveModel
|
operationId: retrieveModel
|
||||||
tags:
|
tags:
|
||||||
- Models
|
- Models
|
||||||
summary: Retrieve model
|
summary: Retrieve model
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/models/retrieve">
|
||||||
|
Equivalent to OpenAI's retrieve model. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: model_id
|
name: model_id
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
# ideally this will be an actual ID, so this will always work from browser
|
|
||||||
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.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -137,7 +147,7 @@ paths:
|
|||||||
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: |
|
||||||
curl https://localhost:1337/v1/models/{model_id}
|
curl https://localhost:1337/v1/models/{model_id}
|
||||||
delete:
|
delete:
|
||||||
@ -145,8 +155,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Models
|
- Models
|
||||||
summary: Delete model
|
summary: Delete model
|
||||||
description: |
|
description: >
|
||||||
Delete a model. <a href = "https://platform.openai.com/docs/api-reference/models/delete"> Equivalent to OpenAI's delete model. </a>
|
Delete a model. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/models/delete">
|
||||||
|
Equivalent to OpenAI's delete model. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: model
|
name: model
|
||||||
@ -164,10 +176,10 @@ paths:
|
|||||||
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: |
|
||||||
curl -X DELETE https://localhost:1337/v1/models/{model_id}
|
curl -X DELETE https://localhost:1337/v1/models/{model_id}
|
||||||
/models/{model_id}/start:
|
"/models/{model_id}/start":
|
||||||
put:
|
put:
|
||||||
operationId: startModel
|
operationId: startModel
|
||||||
tags:
|
tags:
|
||||||
@ -181,7 +193,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
# ideally this will be an actual ID, so this will always work from browser
|
|
||||||
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
|
||||||
@ -193,10 +204,10 @@ paths:
|
|||||||
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: |
|
||||||
curl -X PUT https://localhost:1337/v1/models/{model_id}/start
|
curl -X PUT https://localhost:1337/v1/models/{model_id}/start
|
||||||
/models/{model_id}/stop:
|
"/models/{model_id}/stop":
|
||||||
put:
|
put:
|
||||||
operationId: stopModel
|
operationId: stopModel
|
||||||
tags:
|
tags:
|
||||||
@ -210,7 +221,6 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
# ideally this will be an actual ID, so this will always work from browser
|
|
||||||
example: zephyr-7b
|
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:
|
responses:
|
||||||
@ -221,19 +231,19 @@ paths:
|
|||||||
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: |
|
||||||
curl -X PUT https://localhost:1337/v1/models/{model_id}/stop
|
curl -X PUT https://localhost:1337/v1/models/{model_id}/stop
|
||||||
|
|
||||||
### THREADS
|
|
||||||
/threads:
|
/threads:
|
||||||
post:
|
post:
|
||||||
operationId: createThread
|
operationId: createThread
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Create thread
|
summary: Create thread
|
||||||
description: |
|
description: >
|
||||||
Create a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/createThread"> Equivalent to OpenAI's create thread. </a>
|
Create a thread. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/threads/createThread">
|
||||||
|
Equivalent to OpenAI's create thread. </a>
|
||||||
requestBody:
|
requestBody:
|
||||||
required: false
|
required: false
|
||||||
content:
|
content:
|
||||||
@ -243,7 +253,7 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
messages:
|
messages:
|
||||||
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:
|
||||||
@ -254,7 +264,7 @@ paths:
|
|||||||
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: |
|
||||||
curl -X POST http://localhost:1337/v1/threads \
|
curl -X POST http://localhost:1337/v1/threads \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -285,31 +295,36 @@ paths:
|
|||||||
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
|
||||||
created_at: 1699014083
|
created_at: 1699014083
|
||||||
assistants: ["assistant-001"]
|
assistants:
|
||||||
|
- assistant-001
|
||||||
metadata: {}
|
metadata: {}
|
||||||
messages: []
|
messages: []
|
||||||
- id: "thread_abc456"
|
- id: thread_abc456
|
||||||
object: "thread"
|
object: thread
|
||||||
created_at: 1699014083
|
created_at: 1699014083
|
||||||
assistants: ["assistant-002", "assistant-003"]
|
assistants:
|
||||||
|
- assistant-002
|
||||||
|
- assistant-003
|
||||||
metadata: {}
|
metadata: {}
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: |
|
||||||
curl http://localhost:1337/v1/threads \
|
curl http://localhost:1337/v1/threads \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
"/threads/{thread_id}":
|
||||||
/threads/{thread_id}:
|
|
||||||
get:
|
get:
|
||||||
operationId: getThread
|
operationId: getThread
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Retrieve thread
|
summary: Retrieve thread
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/threads/getThread">
|
||||||
|
Equivalent to OpenAI's retrieve thread. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -319,7 +334,6 @@ paths:
|
|||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the thread to retrieve.
|
The ID of the thread to retrieve.
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Thread details retrieved successfully
|
description: Thread details retrieved successfully
|
||||||
@ -328,7 +342,7 @@ paths:
|
|||||||
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: |
|
||||||
curl http://localhost:1337/v1/threads/{thread_id}
|
curl http://localhost:1337/v1/threads/{thread_id}
|
||||||
post:
|
post:
|
||||||
@ -336,8 +350,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Modify thread
|
summary: Modify thread
|
||||||
description: |
|
description: >
|
||||||
Modifies a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/modifyThread"> Equivalent to OpenAI's modify thread. </a>
|
Modifies a thread. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/threads/modifyThread">
|
||||||
|
Equivalent to OpenAI's modify thread. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -347,7 +363,6 @@ paths:
|
|||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the thread to be modified.
|
The ID of the thread to be modified.
|
||||||
|
|
||||||
requestBody:
|
requestBody:
|
||||||
required: false
|
required: false
|
||||||
content:
|
content:
|
||||||
@ -357,7 +372,7 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
messages:
|
messages:
|
||||||
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:
|
||||||
@ -368,7 +383,7 @@ paths:
|
|||||||
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: |
|
||||||
curl -X POST http://localhost:1337/v1/threads/{thread_id} \
|
curl -X POST http://localhost:1337/v1/threads/{thread_id} \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -387,8 +402,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Delete thread
|
summary: Delete thread
|
||||||
description: |
|
description: >
|
||||||
Delete a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/deleteThread"> Equivalent to OpenAI's delete thread. </a>
|
Delete a thread. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/threads/deleteThread">
|
||||||
|
Equivalent to OpenAI's delete thread. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -406,18 +423,17 @@ paths:
|
|||||||
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: |
|
||||||
curl -X DELETE http://localhost:1337/v1/threads/{thread_id}
|
curl -X DELETE http://localhost:1337/v1/threads/{thread_id}
|
||||||
|
"/threads/{thread_id}/assistants":
|
||||||
/threads/{thread_id}/assistants:
|
|
||||||
get:
|
get:
|
||||||
operationId: getThreadAssistants
|
operationId: getThreadAssistants
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Get Thread.Assistants
|
summary: Get Thread.Assistants
|
||||||
description: |
|
description: |
|
||||||
Can achieve this goal by calling Get thread API
|
Can achieve this goal by calling Get thread API.
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -434,29 +450,26 @@ paths:
|
|||||||
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: |
|
||||||
curl http://localhost:1337/v1/threads/{thread_id}/assistants
|
curl http://localhost:1337/v1/threads/{thread_id}/assistants
|
||||||
|
"/threads/{thread_id}/assistants/{assistants_id}":
|
||||||
/threads/{thread_id}/assistants/{assistants_id}:
|
|
||||||
post:
|
post:
|
||||||
operationId: postThreadAssistants
|
operationId: postThreadAssistants
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Modify Thread.Assistants
|
summary: Modify Thread.Assistants
|
||||||
description: |
|
description: >
|
||||||
|
Can achieve this goal by calling Modify Assistant API with
|
||||||
|
thread.assistant[].
|
||||||
Can achieve this goal by calling Modify Assistant API with thread.assistant[]
|
"/threads/{thread_id}/":
|
||||||
|
|
||||||
/threads/{thread_id}/:
|
|
||||||
get:
|
get:
|
||||||
operationId: listThreadMessage
|
operationId: listThreadMessage
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: List Thread.Messages
|
summary: List Thread.Messages
|
||||||
description: |
|
description: |
|
||||||
Can achieve this goal by calling Get Thread API
|
Can achieve this goal by calling Get Thread API.
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -473,19 +486,19 @@ paths:
|
|||||||
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: |
|
||||||
curl http://localhost:1337/v1/threads/{thread_id}
|
curl http://localhost:1337/v1/threads/{thread_id}
|
||||||
### ASSISTANTS
|
|
||||||
/assistants/:
|
/assistants/:
|
||||||
get:
|
get:
|
||||||
operationId: listAssistants
|
operationId: listAssistants
|
||||||
tags:
|
tags:
|
||||||
- Assistants
|
- Assistants
|
||||||
summary: List assistants
|
summary: List assistants
|
||||||
description: |
|
description: >
|
||||||
Return a list of assistants. <a href = "https://platform.openai.com/docs/api-reference/assistants/listAssistants"> Equivalent to OpenAI's list assistants. </a>
|
Return a list of assistants. <a href =
|
||||||
responses:
|
"https://platform.openai.com/docs/api-reference/assistants/listAssistants">
|
||||||
|
Equivalent to OpenAI's list assistants. </a>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: List of threads retrieved successfully
|
description: List of threads retrieved successfully
|
||||||
@ -494,37 +507,37 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
example:
|
example:
|
||||||
- id: "asst_abc123"
|
- id: asst_abc123
|
||||||
object: "assistant"
|
object: assistant
|
||||||
version: 1
|
version: 1
|
||||||
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
|
||||||
events:
|
events:
|
||||||
in: []
|
in: []
|
||||||
out: []
|
out: []
|
||||||
metadata: {}
|
metadata: {}
|
||||||
|
- id: asst_abc456
|
||||||
- id: "asst_abc456"
|
object: assistant
|
||||||
object: "assistant"
|
|
||||||
version: 1
|
version: 1
|
||||||
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!
|
||||||
events:
|
events:
|
||||||
in: []
|
in: []
|
||||||
out: []
|
out: []
|
||||||
metadata: {}
|
metadata: {}
|
||||||
|
responses: null
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: |
|
||||||
curl http://localhost:1337/v1/assistants \
|
curl http://localhost:1337/v1/assistants \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -533,8 +546,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Assistants
|
- Assistants
|
||||||
summary: Create assistant
|
summary: Create assistant
|
||||||
description: |
|
description: >
|
||||||
Create an assistant with a model and instructions. <a href = "https://platform.openai.com/docs/api-reference/assistants/createAssistant"> Equivalent to OpenAI's create assistants. </a>
|
Create an assistant with a model and instructions. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/assistants/createAssistant">
|
||||||
|
Equivalent to OpenAI's create assistants. </a>
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@ -544,7 +559,9 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -553,13 +570,14 @@ paths:
|
|||||||
example: model_0
|
example: model_0
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description:
|
description: null
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "specs/assistants.yaml#/components/schemas/CreateAssistantResponse"
|
$ref: >-
|
||||||
|
specs/assistants.yaml#/components/schemas/CreateAssistantResponse
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: |
|
||||||
curl http://localhost:1337/v1/assistants \
|
curl http://localhost:1337/v1/assistants \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -570,14 +588,16 @@ paths:
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
/assistants/{assistant_id}:
|
"/assistants/{assistant_id}":
|
||||||
get:
|
get:
|
||||||
operationId: getAssistant
|
operationId: getAssistant
|
||||||
tags:
|
tags:
|
||||||
- Assistants
|
- Assistants
|
||||||
summary: Retrieve assistant
|
summary: Retrieve assistant
|
||||||
description: |
|
description: >
|
||||||
Retrieves an assistant. <a href = "https://platform.openai.com/docs/api-reference/assistants/getAssistant"> Equivalent to OpenAI's retrieve assistants. </a>
|
Retrieves an assistant. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/assistants/getAssistant">
|
||||||
|
Equivalent to OpenAI's retrieve assistants. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: assistant_id
|
name: assistant_id
|
||||||
@ -589,13 +609,14 @@ paths:
|
|||||||
The ID of the assistant to retrieve.
|
The ID of the assistant to retrieve.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description:
|
description: null
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "specs/assistants.yaml#/components/schemas/RetrieveAssistantResponse"
|
$ref: >-
|
||||||
|
specs/assistants.yaml#/components/schemas/RetrieveAssistantResponse
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: |
|
||||||
curl http://localhost:1337/v1/assistants/{assistant_id} \
|
curl http://localhost:1337/v1/assistants/{assistant_id} \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -604,8 +625,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Assistants
|
- Assistants
|
||||||
summary: Modify assistant
|
summary: Modify assistant
|
||||||
description: |
|
description: >
|
||||||
Modifies an assistant. <a href = "https://platform.openai.com/docs/api-reference/assistants/modifyAssistant"> Equivalent to OpenAI's modify assistant. </a>
|
Modifies an assistant. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/assistants/modifyAssistant">
|
||||||
|
Equivalent to OpenAI's modify assistant. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: assistant_id
|
name: assistant_id
|
||||||
@ -624,7 +647,9 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -633,21 +658,22 @@ paths:
|
|||||||
example: model_0
|
example: model_0
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the assistant."
|
description: Name of the assistant.
|
||||||
example: "Physics Tutor"
|
example: Physics Tutor
|
||||||
instructions:
|
instructions:
|
||||||
type: string
|
type: string
|
||||||
description: "A system prompt for the assistant."
|
description: A system prompt for the assistant.
|
||||||
example: Be concise!
|
example: Be concise!
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description:
|
description: null
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "specs/assistants.yaml#/components/schemas/ModifyAssistantResponse"
|
$ref: >-
|
||||||
|
specs/assistants.yaml#/components/schemas/ModifyAssistantResponse
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: |
|
||||||
curl http://localhost:1337/v1/assistants/{assistant_id} \
|
curl http://localhost:1337/v1/assistants/{assistant_id} \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -660,14 +686,15 @@ paths:
|
|||||||
"name": "Physics Tutor",
|
"name": "Physics Tutor",
|
||||||
"instructions": "Be concise!",
|
"instructions": "Be concise!",
|
||||||
}'
|
}'
|
||||||
|
|
||||||
delete:
|
delete:
|
||||||
operationId: deleteAssistant
|
operationId: deleteAssistant
|
||||||
tags:
|
tags:
|
||||||
- Assistants
|
- Assistants
|
||||||
summary: Delete assistant
|
summary: Delete assistant
|
||||||
description: |
|
description: >
|
||||||
Delete an assistant. <a href = "https://platform.openai.com/docs/api-reference/assistants/deleteAssistant"> Equivalent to OpenAI's delete assistant. </a>
|
Delete an assistant. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/assistants/deleteAssistant">
|
||||||
|
Equivalent to OpenAI's delete assistant. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: assistant_id
|
name: assistant_id
|
||||||
@ -683,21 +710,22 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "specs/assistants.yaml#/components/schemas/DeleteAssistantResponse"
|
$ref: >-
|
||||||
|
specs/assistants.yaml#/components/schemas/DeleteAssistantResponse
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: |
|
||||||
curl -X DELETE http://localhost:1337/v1/assistants/{assistant_id}
|
curl -X DELETE http://localhost:1337/v1/assistants/{assistant_id}
|
||||||
|
"/threads/{thread_id}/messages":
|
||||||
### MESSAGES
|
|
||||||
/threads/{thread_id}/messages:
|
|
||||||
get:
|
get:
|
||||||
operationId: listMessages
|
operationId: listMessages
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: List messages
|
summary: List messages
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/messages/listMessages">
|
||||||
|
Equivalent to OpenAI's list messages. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -715,7 +743,7 @@ paths:
|
|||||||
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: |
|
||||||
curl http://localhost:1337/v1/threads/{thread_id}/messages \
|
curl http://localhost:1337/v1/threads/{thread_id}/messages \
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
@ -724,8 +752,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: Create message
|
summary: Create message
|
||||||
description: |
|
description: >
|
||||||
Create a message. <a href = "https://platform.openai.com/docs/api-reference/messages/createMessage"> Equivalent to OpenAI's list messages. </a>
|
Create a message. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/messages/createMessage">
|
||||||
|
Equivalent to OpenAI's list messages. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -746,8 +776,10 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
Role of the sender, either 'user' or 'assistant'.
|
Role of the sender, either 'user' or 'assistant'.
|
||||||
example: "user"
|
example: user
|
||||||
enum: ["user", "assistant"]
|
enum:
|
||||||
|
- user
|
||||||
|
- assistant
|
||||||
content:
|
content:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
@ -764,7 +796,7 @@ paths:
|
|||||||
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: |
|
||||||
curl -X POST http://localhost:1337/v1/threads/{thread_id}/messages \
|
curl -X POST http://localhost:1337/v1/threads/{thread_id}/messages \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -772,15 +804,17 @@ paths:
|
|||||||
"role": "user",
|
"role": "user",
|
||||||
"content": "How does AI work? Explain it in simple terms."
|
"content": "How does AI work? Explain it in simple terms."
|
||||||
}'
|
}'
|
||||||
|
"/threads/{thread_id}/messages/{message_id}":
|
||||||
/threads/{thread_id}/messages/{message_id}:
|
|
||||||
get:
|
get:
|
||||||
operationId: retrieveMessage
|
operationId: retrieveMessage
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: Retrieve message
|
summary: Retrieve message
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/messages/getMessage">
|
||||||
|
Equivalent to OpenAI's retrieve messages. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -798,7 +832,6 @@ paths:
|
|||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the message to retrieve.
|
The ID of the message to retrieve.
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -807,20 +840,22 @@ paths:
|
|||||||
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 http://localhost:1337/v1/threads/{thread_id}/messages/{message_id} \
|
curl
|
||||||
|
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:
|
||||||
operationId: listMessageFiles
|
operationId: listMessageFiles
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: |
|
summary: |
|
||||||
List message files
|
List message files
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/messages/listMessageFiles">
|
||||||
|
Equivalent to OpenAI's list message files. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -830,7 +865,6 @@ paths:
|
|||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the thread containing the message.
|
The ID of the thread containing the message.
|
||||||
|
|
||||||
- in: path
|
- in: path
|
||||||
name: message_id
|
name: message_id
|
||||||
required: true
|
required: true
|
||||||
@ -839,28 +873,32 @@ paths:
|
|||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the message whose files are to be listed.
|
The ID of the message whose files are to be listed.
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: List of files retrieved successfully
|
description: List of files retrieved successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "specs/messages.yaml#/components/schemas/ListMessageFilesResponse"
|
$ref: >-
|
||||||
|
specs/messages.yaml#/components/schemas/ListMessageFilesResponse
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: "curl"
|
- lang: cURL
|
||||||
source: |
|
source: >
|
||||||
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files \
|
curl
|
||||||
|
http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files
|
||||||
|
\
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
|
"/threads/{thread_id}/messages/{message_id}/files/{file_id}":
|
||||||
/threads/{thread_id}/messages/{message_id}/files/{file_id}:
|
|
||||||
get:
|
get:
|
||||||
operationId: retrieveMessageFile
|
operationId: retrieveMessageFile
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: Retrieve message file
|
summary: Retrieve message file
|
||||||
description: |
|
description: >
|
||||||
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. <a
|
||||||
|
href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/messages/getMessageFile">
|
||||||
|
Equivalent to OpenAI's retrieve message file. </a>
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -870,7 +908,6 @@ paths:
|
|||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the thread containing the message.
|
The ID of the thread containing the message.
|
||||||
|
|
||||||
- in: path
|
- in: path
|
||||||
name: message_id
|
name: message_id
|
||||||
required: true
|
required: true
|
||||||
@ -879,7 +916,6 @@ paths:
|
|||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the message associated with the file.
|
The ID of the message associated with the file.
|
||||||
|
|
||||||
- in: path
|
- in: path
|
||||||
name: file_id
|
name: file_id
|
||||||
required: true
|
required: true
|
||||||
@ -888,7 +924,6 @@ paths:
|
|||||||
example: file-abc123
|
example: file-abc123
|
||||||
description: |
|
description: |
|
||||||
The ID of the file to retrieve.
|
The ID of the file to retrieve.
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: File retrieved successfully
|
description: File retrieved successfully
|
||||||
@ -897,17 +932,20 @@ paths:
|
|||||||
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: >
|
||||||
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files/{file_id} \
|
curl
|
||||||
|
http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files/{file_id}
|
||||||
|
\
|
||||||
-H "Content-Type: application/json"
|
-H "Content-Type: application/json"
|
||||||
|
|
||||||
x-webhooks:
|
x-webhooks:
|
||||||
ModelObject:
|
ModelObject:
|
||||||
post:
|
post:
|
||||||
summary: The model object
|
summary: The model object
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/models/object">
|
||||||
|
Equivalent to OpenAI's model object. </a>
|
||||||
operationId: ModelObject
|
operationId: ModelObject
|
||||||
tags:
|
tags:
|
||||||
- Models
|
- Models
|
||||||
@ -919,8 +957,10 @@ x-webhooks:
|
|||||||
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. <a href = "https://platform.openai.com/docs/api-reference/assistants"> Equivalent to OpenAI's assistants object. </a>
|
Build assistants that can call models and use tools to perform tasks.
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/assistants">
|
||||||
|
Equivalent to OpenAI's assistants object. </a>
|
||||||
operationId: AssistantObjects
|
operationId: AssistantObjects
|
||||||
tags:
|
tags:
|
||||||
- Assistants
|
- Assistants
|
||||||
@ -932,8 +972,10 @@ x-webhooks:
|
|||||||
MessageObject:
|
MessageObject:
|
||||||
post:
|
post:
|
||||||
summary: The message object
|
summary: The message object
|
||||||
description: |
|
description: >
|
||||||
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. <a href =
|
||||||
|
"https://platform.openai.com/docs/api-reference/messages/object">
|
||||||
|
Equivalent to OpenAI's message object. </a>
|
||||||
operationId: MessageObject
|
operationId: MessageObject
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
@ -945,7 +987,10 @@ x-webhooks:
|
|||||||
ThreadObject:
|
ThreadObject:
|
||||||
post:
|
post:
|
||||||
summary: The thread object
|
summary: The thread object
|
||||||
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>
|
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>
|
||||||
operationId: ThreadObject
|
operationId: ThreadObject
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
|
|||||||
@ -5,36 +5,36 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the assistant."
|
description: The identifier of the assistant.
|
||||||
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
|
||||||
description: "Version number of the assistant."
|
description: Version number of the assistant.
|
||||||
example: 1
|
example: 1
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the assistant."
|
description: Unix timestamp representing the creation time of the assistant.
|
||||||
example: 1698984975
|
example: 1698984975
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the assistant."
|
description: Name of the assistant.
|
||||||
example: "Math Tutor"
|
example: Math Tutor
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: "Description of the assistant. Can be null."
|
description: Description of the assistant. Can be null.
|
||||||
example: null
|
example: null
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -43,11 +43,11 @@ components:
|
|||||||
example: model_0
|
example: model_0
|
||||||
instructions:
|
instructions:
|
||||||
type: string
|
type: string
|
||||||
description: "A system prompt for the assistant."
|
description: A system prompt for the assistant.
|
||||||
example: Be concise
|
example: Be concise
|
||||||
events:
|
events:
|
||||||
type: object
|
type: object
|
||||||
description: "Event subscription settings for the assistant."
|
description: Event subscription settings for the assistant.
|
||||||
properties:
|
properties:
|
||||||
in:
|
in:
|
||||||
type: array
|
type: array
|
||||||
@ -57,48 +57,45 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
# If there are specific event types, they can be detailed here
|
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the assistant."
|
description: Metadata associated with the assistant.
|
||||||
|
ListAssistantsResponse: null
|
||||||
ListAssistantsResponse:
|
|
||||||
|
|
||||||
CreateAssistantResponse:
|
CreateAssistantResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the assistant."
|
description: The identifier of the assistant.
|
||||||
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
|
||||||
description: "Version number of the assistant."
|
description: Version number of the assistant.
|
||||||
example: 1
|
example: 1
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the assistant."
|
description: Unix timestamp representing the creation time of the assistant.
|
||||||
example: 1698984975
|
example: 1698984975
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the assistant."
|
description: Name of the assistant.
|
||||||
example: "Math Tutor"
|
example: Math Tutor
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: "Description of the assistant. Can be null."
|
description: Description of the assistant. Can be null.
|
||||||
example: null
|
example: null
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -107,11 +104,11 @@ components:
|
|||||||
example: model_0
|
example: model_0
|
||||||
instructions:
|
instructions:
|
||||||
type: string
|
type: string
|
||||||
description: "A system prompt for the assistant."
|
description: A system prompt for the assistant.
|
||||||
example: Be concise
|
example: Be concise
|
||||||
events:
|
events:
|
||||||
type: object
|
type: object
|
||||||
description: "Event subscription settings for the assistant."
|
description: Event subscription settings for the assistant.
|
||||||
properties:
|
properties:
|
||||||
in:
|
in:
|
||||||
type: array
|
type: array
|
||||||
@ -121,46 +118,44 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
# If there are specific event types, they can be detailed here
|
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the assistant."
|
description: Metadata associated with the assistant.
|
||||||
|
|
||||||
RetrieveAssistantResponse:
|
RetrieveAssistantResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the assistant."
|
description: The identifier of the assistant.
|
||||||
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
|
||||||
description: "Version number of the assistant."
|
description: Version number of the assistant.
|
||||||
example: 1
|
example: 1
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the assistant."
|
description: Unix timestamp representing the creation time of the assistant.
|
||||||
example: 1698984975
|
example: 1698984975
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the assistant."
|
description: Name of the assistant.
|
||||||
example: "Math Tutor"
|
example: Math Tutor
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: "Description of the assistant. Can be null."
|
description: Description of the assistant. Can be null.
|
||||||
example: null
|
example: null
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -169,11 +164,11 @@ components:
|
|||||||
example: model_0
|
example: model_0
|
||||||
instructions:
|
instructions:
|
||||||
type: string
|
type: string
|
||||||
description: "A system prompt for the assistant."
|
description: A system prompt for the assistant.
|
||||||
example: Be concise
|
example: Be concise
|
||||||
events:
|
events:
|
||||||
type: object
|
type: object
|
||||||
description: "Event subscription settings for the assistant."
|
description: Event subscription settings for the assistant.
|
||||||
properties:
|
properties:
|
||||||
in:
|
in:
|
||||||
type: array
|
type: array
|
||||||
@ -183,46 +178,44 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
# If there are specific event types, they can be detailed here
|
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the assistant."
|
description: Metadata associated with the assistant.
|
||||||
|
|
||||||
ModifyAssistantObject:
|
ModifyAssistantObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the assistant."
|
description: The identifier of the assistant.
|
||||||
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
|
||||||
description: "Version number of the assistant."
|
description: Version number of the assistant.
|
||||||
example: 1
|
example: 1
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the assistant."
|
description: Unix timestamp representing the creation time of the assistant.
|
||||||
example: 1698984975
|
example: 1698984975
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the assistant."
|
description: Name of the assistant.
|
||||||
example: "Math Tutor"
|
example: Math Tutor
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: "Description of the assistant. Can be null."
|
description: Description of the assistant. Can be null.
|
||||||
example: null
|
example: null
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -231,11 +224,11 @@ components:
|
|||||||
example: model_0
|
example: model_0
|
||||||
instructions:
|
instructions:
|
||||||
type: string
|
type: string
|
||||||
description: "A system prompt for the assistant."
|
description: A system prompt for the assistant.
|
||||||
example: Be concise
|
example: Be concise
|
||||||
events:
|
events:
|
||||||
type: object
|
type: object
|
||||||
description: "Event subscription settings for the assistant."
|
description: Event subscription settings for the assistant.
|
||||||
properties:
|
properties:
|
||||||
in:
|
in:
|
||||||
type: array
|
type: array
|
||||||
@ -245,46 +238,44 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
# If there are specific event types, they can be detailed here
|
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the assistant."
|
description: Metadata associated with the assistant.
|
||||||
|
|
||||||
ModifyAssistantResponse:
|
ModifyAssistantResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the assistant."
|
description: The identifier of the assistant.
|
||||||
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
|
||||||
description: "Version number of the assistant."
|
description: Version number of the assistant.
|
||||||
example: 1
|
example: 1
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the assistant."
|
description: Unix timestamp representing the creation time of the assistant.
|
||||||
example: 1698984975
|
example: 1698984975
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the assistant."
|
description: Name of the assistant.
|
||||||
example: "Physics Tutor"
|
example: Physics Tutor
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: "Description of the assistant. Can be null."
|
description: Description of the assistant. Can be null.
|
||||||
example: null
|
example: null
|
||||||
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.
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -293,11 +284,11 @@ components:
|
|||||||
example: model_0
|
example: model_0
|
||||||
instructions:
|
instructions:
|
||||||
type: string
|
type: string
|
||||||
description: "A system prompt for the assistant."
|
description: A system prompt for the assistant.
|
||||||
example: Be concise!
|
example: Be concise!
|
||||||
events:
|
events:
|
||||||
type: object
|
type: object
|
||||||
description: "Event subscription settings for the assistant."
|
description: Event subscription settings for the assistant.
|
||||||
properties:
|
properties:
|
||||||
in:
|
in:
|
||||||
type: array
|
type: array
|
||||||
@ -307,17 +298,15 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
# If there are specific event types, they can be detailed here
|
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the assistant."
|
description: Metadata associated with the assistant.
|
||||||
|
|
||||||
DeleteAssistantResponse:
|
DeleteAssistantResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the deleted assistant."
|
description: The identifier of the deleted assistant.
|
||||||
example: asst_abc123
|
example: asst_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
@ -325,5 +314,5 @@ components:
|
|||||||
example: assistant.deleted
|
example: assistant.deleted
|
||||||
deleted:
|
deleted:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates whether the assistant was successfully deleted."
|
description: Indicates whether the assistant was successfully deleted.
|
||||||
example: true
|
example: true
|
||||||
|
|||||||
@ -6,48 +6,59 @@ components:
|
|||||||
messages:
|
messages:
|
||||||
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.
|
||||||
example:
|
example:
|
||||||
[
|
- content: "Hello there :wave:"
|
||||||
{ "content": "Hello there :wave:", "role": "assistant" },
|
role: assistant
|
||||||
{ "content": "Can you write a long story", "role": "user" },
|
- content: Can you write a long story
|
||||||
]
|
role: user
|
||||||
stream:
|
stream:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
description: Enables continuous output generation, allowing for streaming of model responses
|
description: >-
|
||||||
|
Enables continuous output generation, allowing for streaming of
|
||||||
|
model responses.
|
||||||
model:
|
model:
|
||||||
type: string
|
type: string
|
||||||
example: "gpt-3.5-turbo"
|
example: gpt-3.5-turbo
|
||||||
description: Specifies the model being used for inference or processing tasks
|
description: Specifies the model being used for inference or processing tasks.
|
||||||
max_tokens:
|
max_tokens:
|
||||||
type: number
|
type: number
|
||||||
default: 2048
|
default: 2048
|
||||||
description: The maximum number of tokens the model will generate in a single response
|
description: >-
|
||||||
|
The maximum number of tokens the model will generate in a single
|
||||||
|
response.
|
||||||
stop:
|
stop:
|
||||||
type: arrays
|
type: arrays
|
||||||
example: ["hello"]
|
example:
|
||||||
description: Defines specific tokens or phrases at which the model will stop generating further output
|
- hello
|
||||||
|
description: >-
|
||||||
|
Defines specific tokens or phrases at which the model will stop
|
||||||
|
generating further output/
|
||||||
frequency_penalty:
|
frequency_penalty:
|
||||||
type: number
|
type: number
|
||||||
default: 0
|
default: 0
|
||||||
description: Adjusts the likelihood of the model repeating words or phrases in its output
|
description: >-
|
||||||
|
Adjusts the likelihood of the model repeating words or phrases in
|
||||||
|
its output.
|
||||||
presence_penalty:
|
presence_penalty:
|
||||||
type: number
|
type: number
|
||||||
default: 0
|
default: 0
|
||||||
description: Influences the generation of new and varied concepts in the model's output
|
description: >-
|
||||||
|
Influences the generation of new and varied concepts in the model's
|
||||||
|
output.
|
||||||
temperature:
|
temperature:
|
||||||
type: number
|
type: number
|
||||||
default: 0.7
|
default: 0.7
|
||||||
min: 0
|
min: 0
|
||||||
max: 1
|
max: 1
|
||||||
description: Controls the randomness of the model's output
|
description: Controls the randomness of the model's output.
|
||||||
top_p:
|
top_p:
|
||||||
type: number
|
type: number
|
||||||
default: 0.95
|
default: 0.95
|
||||||
min: 0
|
min: 0
|
||||||
max: 1
|
max: 1
|
||||||
description: Set probability threshold for more relevant outputs
|
description: Set probability threshold for more relevant outputs.
|
||||||
cache_prompt:
|
cache_prompt:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
@ -58,57 +69,62 @@ components:
|
|||||||
messages:
|
messages:
|
||||||
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.
|
||||||
example:
|
example:
|
||||||
[
|
- content: "Hello there :wave:"
|
||||||
{ "content": "Hello there :wave:", "role": "assistant" },
|
role: assistant
|
||||||
{ "content": "Can you write a long story", "role": "user" },
|
- content: Can you write a long story
|
||||||
]
|
role: user
|
||||||
model:
|
model:
|
||||||
type: string
|
type: string
|
||||||
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.
|
||||||
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.
|
||||||
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.
|
||||||
stop:
|
stop:
|
||||||
type: arrays
|
type: arrays
|
||||||
example: ["hello"]
|
example:
|
||||||
description: |
|
- hello
|
||||||
Defines specific tokens or phrases at which the model will stop generating further output
|
description: >
|
||||||
|
Defines specific tokens or phrases at which the model will stop
|
||||||
|
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 its output
|
Adjusts the likelihood of the model repeating words or phrases in
|
||||||
|
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 output
|
Influences the generation of new and varied concepts in the model's
|
||||||
|
output.
|
||||||
temperature:
|
temperature:
|
||||||
type: number
|
type: number
|
||||||
default: 0.7
|
default: 0.7
|
||||||
min: 0
|
min: 0
|
||||||
max: 1
|
max: 1
|
||||||
description: |
|
description: |
|
||||||
Controls the randomness of the model's output
|
Controls the randomness of the model's output.
|
||||||
top_p:
|
top_p:
|
||||||
type: number
|
type: number
|
||||||
default: 0.95
|
default: 0.95
|
||||||
min: 0
|
min: 0
|
||||||
max: 1
|
max: 1
|
||||||
description: |
|
description: |
|
||||||
Set probability threshold for more relevant outputs
|
Set probability threshold for more relevant outputs.
|
||||||
|
|
||||||
ChatCompletionResponse:
|
ChatCompletionResponse:
|
||||||
type: object
|
type: object
|
||||||
description: Description of the response structure
|
description: Description of the response structure
|
||||||
@ -123,7 +139,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
|
||||||
@ -133,7 +149,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
content:
|
content:
|
||||||
type: string
|
type: string
|
||||||
example: "Hello user. What can I help you with?"
|
example: Hello user. What can I help you with?
|
||||||
description: Content of the message
|
description: Content of the message
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@ -6,34 +6,37 @@ components:
|
|||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Sequential or UUID identifier of the message."
|
Sequential or UUID identifier of the message.
|
||||||
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'.
|
||||||
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.
|
||||||
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
|
||||||
example: "thread_asdf"
|
parent thread.
|
||||||
|
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.
|
||||||
example: jan
|
example: jan
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
enum: ["user", "assistant"]
|
enum:
|
||||||
|
- user
|
||||||
|
- assistant
|
||||||
description: |
|
description: |
|
||||||
"Role of the sender, either 'user' or 'assistant'."
|
Role of the sender, either 'user' or 'assistant'.
|
||||||
|
|
||||||
content:
|
content:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -42,36 +45,33 @@ components:
|
|||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Type of content, e.g., 'text'."
|
Type of content, e.g., 'text'.
|
||||||
|
|
||||||
text:
|
text:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
value:
|
value:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Text content of the message."
|
Text content of the message.
|
||||||
example: "Hi!?"
|
example: Hi!?
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Annotations for the text content, if any."
|
Annotations for the text content, if any.
|
||||||
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.
|
||||||
|
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
GetMessageResponse:
|
GetMessageResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the message."
|
description: The identifier of the message.
|
||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
@ -80,11 +80,11 @@ components:
|
|||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the message."
|
description: Unix timestamp representing the creation time of the message.
|
||||||
example: 1699017614
|
example: 1699017614
|
||||||
thread_id:
|
thread_id:
|
||||||
type: string
|
type: string
|
||||||
description: "Identifier of the thread to which this message belongs."
|
description: Identifier of the thread to which this message belongs.
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
@ -104,8 +104,8 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
value:
|
value:
|
||||||
type: string
|
type: string
|
||||||
description: "Text content of the message."
|
description: Text content of the message.
|
||||||
example: "How does AI work? Explain it in simple terms."
|
example: How does AI work? Explain it in simple terms.
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -128,15 +128,14 @@ components:
|
|||||||
example: null
|
example: null
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the message."
|
description: Metadata associated with the message.
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
CreateMessageResponse:
|
CreateMessageResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the created message."
|
description: The identifier of the created message.
|
||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
@ -145,11 +144,11 @@ components:
|
|||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the message."
|
description: Unix timestamp representing the creation time of the message.
|
||||||
example: 1699017614
|
example: 1699017614
|
||||||
thread_id:
|
thread_id:
|
||||||
type: string
|
type: string
|
||||||
description: "Identifier of the thread to which this message belongs."
|
description: Identifier of the thread to which this message belongs.
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
@ -169,8 +168,8 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
value:
|
value:
|
||||||
type: string
|
type: string
|
||||||
description: "Text content of the message."
|
description: Text content of the message.
|
||||||
example: "How does AI work? Explain it in simple terms."
|
example: How does AI work? Explain it in simple terms.
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -193,39 +192,37 @@ components:
|
|||||||
example: null
|
example: null
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the message."
|
description: Metadata associated with the message.
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
ListMessagesResponse:
|
ListMessagesResponse:
|
||||||
type: object
|
type: object
|
||||||
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
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/ListMessageObject"
|
$ref: "#/components/schemas/ListMessageObject"
|
||||||
first_id:
|
first_id:
|
||||||
type: string
|
type: string
|
||||||
description: "Identifier of the first message in the list."
|
description: Identifier of the first message in the list.
|
||||||
example: "msg_abc123"
|
example: msg_abc123
|
||||||
last_id:
|
last_id:
|
||||||
type: string
|
type: string
|
||||||
description: "Identifier of the last message in the list."
|
description: Identifier of the last message in the list.
|
||||||
example: "msg_abc456"
|
example: msg_abc456
|
||||||
has_more:
|
has_more:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates whether there are more messages to retrieve."
|
description: Indicates whether there are more messages to retrieve.
|
||||||
example: false
|
example: false
|
||||||
|
|
||||||
ListMessageObject:
|
ListMessageObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the message."
|
description: The identifier of the message.
|
||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
@ -234,11 +231,11 @@ components:
|
|||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the message."
|
description: Unix timestamp representing the creation time of the message.
|
||||||
example: 1699017614
|
example: 1699017614
|
||||||
thread_id:
|
thread_id:
|
||||||
type: string
|
type: string
|
||||||
description: "Identifier of the thread to which this message belongs."
|
description: Identifier of the thread to which this message belongs.
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
@ -257,8 +254,8 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
value:
|
value:
|
||||||
type: string
|
type: string
|
||||||
description: "Text content of the message."
|
description: Text content of the message.
|
||||||
example: "How does AI work? Explain it in simple terms."
|
example: How does AI work? Explain it in simple terms.
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -280,37 +277,35 @@ components:
|
|||||||
example: null
|
example: null
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the message."
|
description: Metadata associated with the message.
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
MessageFileObject:
|
MessageFileObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the file."
|
description: The identifier of the file.
|
||||||
example: file-abc123
|
example: file-abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of the object, indicating it's a thread message file."
|
description: Type of the object, indicating it's a thread message file.
|
||||||
example: thread.message.file
|
example: thread.message.file
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the file."
|
description: Unix timestamp representing the creation time of the file.
|
||||||
example: 1699061776
|
example: 1699061776
|
||||||
message_id:
|
message_id:
|
||||||
type: string
|
type: string
|
||||||
description: "Identifier of the message to which this file is associated."
|
description: Identifier of the message to which this file is associated.
|
||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
|
|
||||||
ListMessageFilesResponse:
|
ListMessageFilesResponse:
|
||||||
type: object
|
type: object
|
||||||
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
|
||||||
items:
|
items:
|
||||||
|
|||||||
@ -5,7 +5,8 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
enum: [list]
|
enum:
|
||||||
|
- list
|
||||||
data:
|
data:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -13,68 +14,75 @@ components:
|
|||||||
required:
|
required:
|
||||||
- object
|
- object
|
||||||
- data
|
- data
|
||||||
|
|
||||||
Model:
|
Model:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
default: "model"
|
default: model
|
||||||
description: "The type of the object."
|
description: The type of the object.
|
||||||
version:
|
version:
|
||||||
type: string
|
type: string
|
||||||
default: "1"
|
default: "1"
|
||||||
description: "The version number of the model."
|
description: The version number of the model.
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "Unique identifier used in chat-completions model_name, matches folder name."
|
description: >-
|
||||||
example: "zephyr-7b"
|
Unique identifier used in chat-completions model_name, matches
|
||||||
|
folder name.
|
||||||
|
example: zephyr-7b
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
description: "Name of the model."
|
description: Name of the model.
|
||||||
example: "Zephyr 7B"
|
example: Zephyr 7B
|
||||||
owned_by:
|
owned_by:
|
||||||
type: string
|
type: string
|
||||||
description: "Compatibility field for OpenAI."
|
description: Compatibility field for OpenAI.
|
||||||
default: ""
|
default: ""
|
||||||
created:
|
created:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time."
|
description: Unix timestamp representing the creation time.
|
||||||
description:
|
description:
|
||||||
type: string
|
type: string
|
||||||
description: "Description of the model."
|
description: Description of the model.
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
enum: [null, "downloading", "ready", "starting", "stopping"]
|
enum:
|
||||||
description: "Current state of the model."
|
- null
|
||||||
|
- downloading
|
||||||
|
- ready
|
||||||
|
- starting
|
||||||
|
- stopping
|
||||||
|
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: "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf"
|
example: >-
|
||||||
|
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:
|
||||||
ctx_len:
|
ctx_len:
|
||||||
type: string
|
type: string
|
||||||
description: "Context length."
|
description: Context length.
|
||||||
example: "2048"
|
example: "2048"
|
||||||
ngl:
|
ngl:
|
||||||
type: string
|
type: string
|
||||||
description: "Number of layers."
|
description: Number of layers.
|
||||||
example: "100"
|
example: "100"
|
||||||
embedding:
|
embedding:
|
||||||
type: string
|
type: string
|
||||||
description: "Indicates if embedding is enabled."
|
description: Indicates if embedding is enabled.
|
||||||
example: "true"
|
example: "true"
|
||||||
n_parallel:
|
n_parallel:
|
||||||
type: string
|
type: string
|
||||||
description: "Number of parallel processes."
|
description: Number of parallel processes.
|
||||||
example: "4"
|
example: "4"
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
parameters:
|
parameters:
|
||||||
@ -82,147 +90,152 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
temperature:
|
temperature:
|
||||||
type: string
|
type: string
|
||||||
description: "Temperature setting for the model."
|
description: Temperature setting for the model.
|
||||||
example: "0.7"
|
example: "0.7"
|
||||||
token_limit:
|
token_limit:
|
||||||
type: string
|
type: string
|
||||||
description: "Token limit for the model."
|
description: Token limit for the model.
|
||||||
example: "2048"
|
example: "2048"
|
||||||
top_k:
|
top_k:
|
||||||
type: string
|
type: string
|
||||||
description: "Top-k setting for the model."
|
description: Top-k setting for the model.
|
||||||
example: "0"
|
example: "0"
|
||||||
top_p:
|
top_p:
|
||||||
type: string
|
type: string
|
||||||
description: "Top-p setting for the model."
|
description: Top-p setting for the model.
|
||||||
example: "1"
|
example: "1"
|
||||||
stream:
|
stream:
|
||||||
type: string
|
type: string
|
||||||
description: "Indicates if streaming is enabled."
|
description: Indicates if streaming is enabled.
|
||||||
example: "true"
|
example: "true"
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Additional metadata."
|
description: Additional metadata.
|
||||||
assets:
|
assets:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: "List of assets related to the model."
|
description: List of assets related to the model.
|
||||||
required:
|
required:
|
||||||
- source_url
|
- source_url
|
||||||
|
|
||||||
ModelObject:
|
ModelObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"The identifier of the model."
|
The identifier of the model.
|
||||||
|
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.
|
||||||
|
default: model
|
||||||
default: "model"
|
|
||||||
created:
|
created:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: |
|
description: |
|
||||||
"Unix timestamp representing the creation time of the model."
|
Unix timestamp representing the creation time of the model.
|
||||||
|
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.
|
||||||
|
example: _
|
||||||
example: "_"
|
|
||||||
|
|
||||||
GetModelResponse:
|
GetModelResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the model."
|
description: The identifier of the model.
|
||||||
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
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the model."
|
description: Unix timestamp representing the creation time of the model.
|
||||||
owned_by:
|
owned_by:
|
||||||
type: string
|
type: string
|
||||||
description: "The entity that owns the model."
|
description: The entity that owns the model.
|
||||||
example: "_"
|
example: _
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
enum: [not_downloaded, downloaded, running, stopped]
|
enum:
|
||||||
description: "The current state of the model."
|
- not_downloaded
|
||||||
|
- downloaded
|
||||||
|
- running
|
||||||
|
- stopped
|
||||||
|
description: The current state of the model.
|
||||||
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: "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf"
|
example: >-
|
||||||
|
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:
|
||||||
pre_prompt:
|
pre_prompt:
|
||||||
type: string
|
type: string
|
||||||
description: "Predefined prompt used for setting up internal configurations."
|
description: Predefined prompt used for setting up internal configurations.
|
||||||
default: ""
|
default: ""
|
||||||
example: "Initial setup complete."
|
example: Initial setup complete.
|
||||||
system_prompt:
|
system_prompt:
|
||||||
type: string
|
type: string
|
||||||
description: "Prefix used for system-level prompts."
|
description: Prefix used for system-level prompts.
|
||||||
default: "SYSTEM: "
|
default: "SYSTEM: "
|
||||||
user_prompt:
|
user_prompt:
|
||||||
type: string
|
type: string
|
||||||
description: "Prefix used for user prompts."
|
description: Prefix used for user prompts.
|
||||||
default: "USER: "
|
default: "USER: "
|
||||||
ai_prompt:
|
ai_prompt:
|
||||||
type: string
|
type: string
|
||||||
description: "Prefix used for assistant prompts."
|
description: Prefix used for assistant prompts.
|
||||||
default: "ASSISTANT: "
|
default: "ASSISTANT: "
|
||||||
ngl:
|
ngl:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of neural network layers loaded onto the GPU for acceleration."
|
description: >-
|
||||||
|
Number of neural network layers loaded onto the GPU for
|
||||||
|
acceleration.
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 100
|
maximum: 100
|
||||||
default: 100
|
default: 100
|
||||||
example: 100
|
example: 100
|
||||||
ctx_len:
|
ctx_len:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Context length for model operations, varies based on the specific model."
|
description: >-
|
||||||
|
Context length for model operations, varies based on the
|
||||||
|
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: "Number of parallel operations, relevant when continuous batching is enabled."
|
description: >-
|
||||||
|
Number of parallel operations, relevant when continuous batching
|
||||||
|
is enabled.
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 10
|
maximum: 10
|
||||||
default: 1
|
default: 1
|
||||||
example: 4
|
example: 4
|
||||||
cont_batching:
|
cont_batching:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates if continuous batching is used for processing."
|
description: Indicates if continuous batching is used for processing.
|
||||||
default: false
|
default: false
|
||||||
example: false
|
example: false
|
||||||
cpu_threads:
|
cpu_threads:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of threads allocated for CPU-based inference."
|
description: Number of threads allocated for CPU-based inference.
|
||||||
minimum: 1
|
minimum: 1
|
||||||
example: 8
|
example: 8
|
||||||
embedding:
|
embedding:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates if embedding layers are enabled in the model."
|
description: Indicates if embedding layers are enabled in the model.
|
||||||
default: true
|
default: true
|
||||||
example: true
|
example: true
|
||||||
model_parameters:
|
model_parameters:
|
||||||
@ -230,74 +243,84 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
ctx_len:
|
ctx_len:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Maximum context length the model can handle."
|
description: Maximum context length the model can handle.
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 4096
|
maximum: 4096
|
||||||
default: 2048
|
default: 2048
|
||||||
example: 2048
|
example: 2048
|
||||||
ngl:
|
ngl:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of layers in the neural network."
|
description: Number of layers in the neural network.
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 100
|
maximum: 100
|
||||||
default: 100
|
default: 100
|
||||||
example: 100
|
example: 100
|
||||||
embedding:
|
embedding:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates if embedding layers are used."
|
description: Indicates if embedding layers are used.
|
||||||
default: true
|
default: true
|
||||||
example: true
|
example: true
|
||||||
n_parallel:
|
n_parallel:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Number of parallel processes the model can run."
|
description: Number of parallel processes the model can run.
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 10
|
maximum: 10
|
||||||
default: 1
|
default: 1
|
||||||
example: 4
|
example: 4
|
||||||
temperature:
|
temperature:
|
||||||
type: number
|
type: number
|
||||||
description: "Controls randomness in model's responses. Higher values lead to more random responses."
|
description: >-
|
||||||
minimum: 0.0
|
Controls randomness in model's responses. Higher values lead to
|
||||||
maximum: 2.0
|
more random responses.
|
||||||
|
minimum: 0
|
||||||
|
maximum: 2
|
||||||
default: 0.7
|
default: 0.7
|
||||||
example: 0.7
|
example: 0.7
|
||||||
token_limit:
|
token_limit:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Maximum number of tokens the model can generate in a single response."
|
description: >-
|
||||||
|
Maximum number of tokens the model can generate in a single
|
||||||
|
response.
|
||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 4096
|
maximum: 4096
|
||||||
default: 2048
|
default: 2048
|
||||||
example: 2048
|
example: 2048
|
||||||
top_k:
|
top_k:
|
||||||
type: integer
|
type: integer
|
||||||
description: "Limits the model to consider only the top k most likely next tokens at each step."
|
description: >-
|
||||||
|
Limits the model to consider only the top k most likely next
|
||||||
|
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: "Nucleus sampling parameter. The model considers the smallest set of tokens whose cumulative probability exceeds the top_p value."
|
description: >-
|
||||||
minimum: 0.0
|
Nucleus sampling parameter. The model considers the smallest set
|
||||||
maximum: 1.0
|
of tokens whose cumulative probability exceeds the top_p value.
|
||||||
default: 1.0
|
minimum: 0
|
||||||
example: 1.0
|
maximum: 1
|
||||||
|
default: 1
|
||||||
|
example: 1
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
engine:
|
engine:
|
||||||
type: string
|
type: string
|
||||||
description: "The engine used by the model."
|
description: The engine used by the model.
|
||||||
enum: [nitro, openai, hf_inference]
|
enum:
|
||||||
|
- nitro
|
||||||
|
- openai
|
||||||
|
- hf_inference
|
||||||
quantization:
|
quantization:
|
||||||
type: string
|
type: string
|
||||||
description: "Quantization parameter of the model."
|
description: Quantization parameter of the model.
|
||||||
example: "Q3_K_L"
|
example: Q3_K_L
|
||||||
size:
|
size:
|
||||||
type: string
|
type: string
|
||||||
description: "Size of the model."
|
description: Size of the model.
|
||||||
example: "7B"
|
example: 7B
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- object
|
- object
|
||||||
@ -307,75 +330,71 @@ components:
|
|||||||
- source_url
|
- source_url
|
||||||
- parameters
|
- parameters
|
||||||
- metadata
|
- metadata
|
||||||
|
|
||||||
DeleteModelResponse:
|
DeleteModelResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the model that was deleted."
|
description: The identifier of the model that was deleted.
|
||||||
example: "model-zephyr-7B"
|
example: model-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
|
||||||
deleted:
|
deleted:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates whether the model was successfully deleted."
|
description: Indicates whether the model was successfully deleted.
|
||||||
example: true
|
example: true
|
||||||
|
|
||||||
StartModelResponse:
|
StartModelResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the model that was started."
|
description: The identifier of the model that was started.
|
||||||
example: "model-zephyr-7B"
|
example: model-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
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: "The current state of the model after the start operation."
|
description: The current state of the model after the start operation.
|
||||||
example: "running"
|
example: running
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- object
|
- object
|
||||||
- state
|
- state
|
||||||
|
|
||||||
StopModelResponse:
|
StopModelResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the model that was started."
|
description: The identifier of the model that was started.
|
||||||
example: "model-zephyr-7B"
|
example: model-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
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: "The current state of the model after the start operation."
|
description: The current state of the model after the start operation.
|
||||||
example: "stopped"
|
example: stopped
|
||||||
required:
|
required:
|
||||||
- id
|
- id
|
||||||
- object
|
- object
|
||||||
- state
|
- state
|
||||||
|
|
||||||
DownloadModelResponse:
|
DownloadModelResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the model that was started."
|
description: The identifier of the model that was started.
|
||||||
example: "model-zephyr-7B"
|
example: model-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
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: "The current state of the model after the start operation."
|
description: The current state of the model after the start operation.
|
||||||
example: "downloaded"
|
example: downloaded
|
||||||
|
|||||||
@ -6,118 +6,111 @@ components:
|
|||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"The identifier of the thread, defaults to foldername."
|
The identifier of the thread, defaults to foldername.
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
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.
|
||||||
example: "funny physics joke"
|
example: funny physics joke
|
||||||
assistants:
|
assistants:
|
||||||
type: array
|
type: array
|
||||||
description: |
|
description: ""
|
||||||
|
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
assistant_id:
|
assistant_id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The identifier of assistant, defaults to "jan"
|
The identifier of assistant, defaults to "jan"
|
||||||
|
|
||||||
example: jan
|
example: jan
|
||||||
model:
|
model:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: ""
|
||||||
|
|
||||||
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")
|
||||||
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")
|
||||||
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.
|
||||||
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.
|
||||||
|
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
GetThreadResponse:
|
GetThreadResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the thread."
|
description: The identifier of the thread.
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of the object"
|
description: Type of the object
|
||||||
example: thread
|
example: thread
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the thread."
|
description: Unix timestamp representing the creation time of the thread.
|
||||||
example: 1699014083
|
example: 1699014083
|
||||||
assistants:
|
assistants:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: "List of assistants involved in the thread."
|
description: List of assistants involved in the thread.
|
||||||
example: ["assistant-001"]
|
example:
|
||||||
|
- assistant-001
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the thread."
|
description: Metadata associated with the thread.
|
||||||
example: {}
|
example: {}
|
||||||
messages:
|
messages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: "List of messages within the thread."
|
description: List of messages within the thread.
|
||||||
example: []
|
example: []
|
||||||
|
|
||||||
CreateThreadResponse:
|
CreateThreadResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the newly created thread."
|
description: The identifier of the newly created thread.
|
||||||
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
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the thread."
|
description: Unix timestamp representing the creation time of the thread.
|
||||||
example: 1699014083
|
example: 1699014083
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the newly created thread."
|
description: Metadata associated with the newly created thread.
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
ThreadMessageObject:
|
ThreadMessageObject:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -125,20 +118,19 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Role of the sender, either 'user' or 'assistant'."
|
"Role of the sender, either 'user' or 'assistant'."
|
||||||
|
enum:
|
||||||
enum: ["user", "assistant"]
|
- user
|
||||||
|
- assistant
|
||||||
content:
|
content:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Text content of the message."
|
"Text content of the message."
|
||||||
|
|
||||||
file_ids:
|
file_ids:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
"Array of file IDs associated with the message, if any."
|
"Array of file IDs associated with the message, if any."
|
||||||
|
|
||||||
ModifyThreadResponse:
|
ModifyThreadResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -154,19 +146,18 @@ components:
|
|||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the thread."
|
description: Unix timestamp representing the creation time of the thread.
|
||||||
example: 1699014083
|
example: 1699014083
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the modified thread."
|
description: Metadata associated with the modified thread.
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
DeleteThreadResponse:
|
DeleteThreadResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the deleted thread."
|
description: The identifier of the deleted thread.
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
@ -174,5 +165,5 @@ components:
|
|||||||
example: thread.deleted
|
example: thread.deleted
|
||||||
deleted:
|
deleted:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: "Indicates whether the thread was successfully deleted."
|
description: Indicates whether the thread was successfully deleted.
|
||||||
example: true
|
example: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user