docs: finalize thread
This commit is contained in:
parent
31f16503c7
commit
2877f3234b
@ -263,7 +263,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Create thread
|
summary: Create thread
|
||||||
description: Create a thread
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/threads/createThread"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Create a thread
|
||||||
requestBody:
|
requestBody:
|
||||||
required: false
|
required: false
|
||||||
content:
|
content:
|
||||||
@ -303,7 +306,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: List threads
|
summary: List threads
|
||||||
description: Retrieves a list of all threads available in the system.
|
description: |
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
|
||||||
|
Retrieves a list of all threads available in the system.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: List of threads retrieved successfully
|
description: List of threads retrieved successfully
|
||||||
@ -336,8 +342,11 @@ paths:
|
|||||||
operationId: getThread
|
operationId: getThread
|
||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Get thread
|
summary: Retrieve thread
|
||||||
description: Retrieves detailed information about a specific thread using its thread_id.
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/threads/getThread"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Retrieves detailed information about a specific thread using its thread_id.
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -345,7 +354,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: The ID of the thread to retrieve.
|
description: |
|
||||||
|
The ID of the thread to retrieve.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Thread details retrieved successfully
|
description: Thread details retrieved successfully
|
||||||
@ -362,7 +374,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Modify thread
|
summary: Modify thread
|
||||||
description: Modifies a thread
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/threads/modifyThread"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Modifies a thread
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -370,7 +385,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: The ID of the thread to be modified.
|
description: |
|
||||||
|
The ID of the thread to be modified.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
requestBody:
|
requestBody:
|
||||||
required: false
|
required: false
|
||||||
content:
|
content:
|
||||||
@ -411,7 +429,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Delete thread
|
summary: Delete thread
|
||||||
description: Delete a thread
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/threads/deleteThread"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Delete a thread
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -419,7 +440,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: The ID of the thread to be deleted.
|
description: |
|
||||||
|
The ID of the thread to be deleted.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: Thread deleted successfully
|
description: Thread deleted successfully
|
||||||
@ -439,8 +463,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: Get Thread.Assistants
|
summary: Get Thread.Assistants
|
||||||
description:
|
description: |
|
||||||
- Can achieve this goal by calling Get thread API
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
|
||||||
|
Can achieve this goal by calling Get thread API
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -467,8 +493,10 @@ paths:
|
|||||||
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[]
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
|
||||||
|
Can achieve this goal by calling Modify Assistant API with thread.assistant[]
|
||||||
|
|
||||||
/threads/{thread_id}/:
|
/threads/{thread_id}/:
|
||||||
get:
|
get:
|
||||||
@ -476,8 +504,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Threads
|
- Threads
|
||||||
summary: List Thread.Messages
|
summary: List Thread.Messages
|
||||||
description:
|
description: |
|
||||||
- Can achieve this goal by calling Get Thread API
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
|
||||||
|
Can achieve this goal by calling Get Thread API
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -775,9 +805,13 @@ x-webhooks:
|
|||||||
post:
|
post:
|
||||||
summary: The thread object
|
summary: The thread object
|
||||||
description: |
|
description: |
|
||||||
- Each `thread` folder contains a `thread.json` file, which is a representation of a thread.
|
<a href = "https://platform.openai.com/docs/api-reference/threads/object"> <button style = "color: #388434"> OpenAI compatible </button></a> and <span style = "color: #fec928"> Jan </span>
|
||||||
- `thread.json` contains metadata and model parameter overrides.
|
|
||||||
- There are no required fields.
|
Each `thread` folder contains a `thread.json` file, which is a representation of a thread.
|
||||||
|
|
||||||
|
`thread.json` contains metadata and model parameter overrides.
|
||||||
|
|
||||||
|
There are no required fields.
|
||||||
|
|
||||||
operationId: ThreadObject
|
operationId: ThreadObject
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@ -5,47 +5,73 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the thread, defaults to foldername."
|
description: |
|
||||||
|
"The identifier of the thread, defaults to foldername."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: thread_....
|
example: thread_....
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of the object, defaults to thread."
|
description: |
|
||||||
|
"Type of the object, defaults to thread."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: thread
|
example: thread
|
||||||
summary:
|
title:
|
||||||
type: string
|
type: string
|
||||||
description: "A brief summary or description of the thread, defaults to an empty string."
|
description: |
|
||||||
|
"A brief summary or description of the thread, defaults to an empty string."
|
||||||
|
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
example: "funny physics joke"
|
example: "funny physics joke"
|
||||||
assistants:
|
assistants:
|
||||||
type: array
|
type: array
|
||||||
|
description: |
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
items:
|
items:
|
||||||
|
properties:
|
||||||
|
assistant_id:
|
||||||
type: string
|
type: string
|
||||||
description: "List of assistants involved in the thread, defaults to [\"jan\"]."
|
description: |
|
||||||
example: ["jan"]
|
The identifier of assistant, defaults to "jan"
|
||||||
|
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
example: jan
|
||||||
|
model:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
example: ...
|
||||||
|
settings:
|
||||||
|
type: object
|
||||||
|
description: |
|
||||||
|
Defaults to and overrides assistant.json's "settings" (and if none, then model.json "settings")
|
||||||
|
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
|
parameters:
|
||||||
|
type: object
|
||||||
|
description: |
|
||||||
|
Defaults to and overrides assistant.json's "parameters" (and if none, then model.json "parameters")
|
||||||
|
|
||||||
|
<span style = "color: #fec928"> Jan </span>
|
||||||
created:
|
created:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the thread, defaults to file creation time."
|
description: |
|
||||||
|
"Unix timestamp representing the creation time of the thread, defaults to file creation time."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: 1231231
|
example: 1231231
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the thread, defaults to an empty object."
|
description: |
|
||||||
|
"Metadata associated with the thread, defaults to an empty object."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: {}
|
example: {}
|
||||||
messages:
|
|
||||||
type: array
|
|
||||||
description: "List of messages within the thread."
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
example: []
|
|
||||||
model_id:
|
|
||||||
type: string
|
|
||||||
description: "Model identifier associated with the thread, defaults to assistant.model."
|
|
||||||
example: "..."
|
|
||||||
settings:
|
|
||||||
type: object
|
|
||||||
description: "Settings for the thread, defaults to and overrides assistant.settings."
|
|
||||||
parameters:
|
|
||||||
type: object
|
|
||||||
description: "Parameters for the thread, defaults to and overrides assistant.settings."
|
|
||||||
|
|
||||||
GetThreadResponse:
|
GetThreadResponse:
|
||||||
type: object
|
type: object
|
||||||
@ -106,23 +132,33 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
description: "Role of the sender, either 'user' or 'assistant'."
|
description: |
|
||||||
|
"Role of the sender, either 'user' or 'assistant'."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
enum: ["user", "assistant"]
|
enum: ["user", "assistant"]
|
||||||
content:
|
content:
|
||||||
type: string
|
type: string
|
||||||
description: "Text content of the message."
|
description: |
|
||||||
|
"Text content of the message."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
file_ids:
|
file_ids:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: "Array of file IDs associated with the message, if any."
|
description: |
|
||||||
|
"Array of file IDs associated with the message, if any."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
|
|
||||||
ModifyThreadResponse:
|
ModifyThreadResponse:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "The identifier of the modified thread."
|
description: |
|
||||||
|
"The identifier of the modified thread."
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user