docs: yaml lint
This commit is contained in:
parent
02f2536410
commit
497020c7a3
@ -58,7 +58,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: specs/chat.yaml#/components/schemas/ChatCompletionRequest
|
$ref: specs/chat.yaml#/components/schemas/ChatCompletionRequest
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -207,7 +207,7 @@ paths:
|
|||||||
= "https://platform.openai.com/docs/api-reference/models/list">
|
= "https://platform.openai.com/docs/api-reference/models/list">
|
||||||
Equivalent to OpenAI's list model. </a>
|
Equivalent to OpenAI's list model. </a>
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -226,7 +226,6 @@ paths:
|
|||||||
headers: {Accept: 'application/json'}
|
headers: {Accept: 'application/json'}
|
||||||
});
|
});
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
- lang: Node.js
|
- lang: Node.js
|
||||||
source: |-
|
source: |-
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
@ -248,7 +247,7 @@ paths:
|
|||||||
headers = {'Accept': 'application/json'}
|
headers = {'Accept': 'application/json'}
|
||||||
response = requests.get(url, headers=headers)
|
response = requests.get(url, headers=headers)
|
||||||
data = response.json()
|
data = response.json()
|
||||||
'/models/download/{model_id}':
|
"/models/download/{model_id}":
|
||||||
get:
|
get:
|
||||||
operationId: downloadModel
|
operationId: downloadModel
|
||||||
tags:
|
tags:
|
||||||
@ -266,7 +265,7 @@ paths:
|
|||||||
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
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -306,7 +305,7 @@ paths:
|
|||||||
response = requests.get('http://localhost:1337/v1/models/download/{model_id}', headers={'accept': 'application/json'})
|
response = requests.get('http://localhost:1337/v1/models/download/{model_id}', headers={'accept': 'application/json'})
|
||||||
|
|
||||||
data = response.json()
|
data = response.json()
|
||||||
'/models/{model_id}':
|
"/models/{model_id}":
|
||||||
get:
|
get:
|
||||||
operationId: retrieveModel
|
operationId: retrieveModel
|
||||||
tags:
|
tags:
|
||||||
@ -327,7 +326,7 @@ paths:
|
|||||||
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
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -393,7 +392,7 @@ paths:
|
|||||||
description: |
|
description: |
|
||||||
The model id to delete
|
The model id to delete
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -455,7 +454,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: specs/threads.yaml#/components/schemas/CreateThreadObject
|
$ref: specs/threads.yaml#/components/schemas/CreateThreadObject
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Thread created successfully
|
description: Thread created successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -551,7 +550,7 @@ paths:
|
|||||||
description: |
|
description: |
|
||||||
Retrieves a list of all threads available in the system.
|
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
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -606,7 +605,7 @@ paths:
|
|||||||
|
|
||||||
response = requests.get(url, headers=headers)
|
response = requests.get(url, headers=headers)
|
||||||
print(response.json())
|
print(response.json())
|
||||||
'/threads/{thread_id}':
|
"/threads/{thread_id}":
|
||||||
get:
|
get:
|
||||||
operationId: getThread
|
operationId: getThread
|
||||||
tags:
|
tags:
|
||||||
@ -626,7 +625,7 @@ paths:
|
|||||||
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
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -666,7 +665,7 @@ paths:
|
|||||||
items:
|
items:
|
||||||
$ref: specs/threads.yaml#/components/schemas/ThreadMessageObject
|
$ref: specs/threads.yaml#/components/schemas/ThreadMessageObject
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Thread modified successfully
|
description: Thread modified successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -705,7 +704,7 @@ paths:
|
|||||||
description: |
|
description: |
|
||||||
The ID of the thread to be deleted.
|
The ID of the thread to be deleted.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Thread deleted successfully
|
description: Thread deleted successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -726,7 +725,7 @@ paths:
|
|||||||
"https://platform.openai.com/docs/api-reference/assistants/listAssistants">
|
"https://platform.openai.com/docs/api-reference/assistants/listAssistants">
|
||||||
Equivalent to OpenAI's list assistants. </a>
|
Equivalent to OpenAI's list assistants. </a>
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: List of assistants retrieved successfully
|
description: List of assistants retrieved successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -792,7 +791,7 @@ paths:
|
|||||||
headers = {'Content-Type': 'application/json'}
|
headers = {'Content-Type': 'application/json'}
|
||||||
|
|
||||||
response = requests.get(url, headers=headers)
|
response = requests.get(url, headers=headers)
|
||||||
'/assistants/{assistant_id}':
|
"/assistants/{assistant_id}":
|
||||||
get:
|
get:
|
||||||
operationId: getAssistant
|
operationId: getAssistant
|
||||||
tags:
|
tags:
|
||||||
@ -812,7 +811,7 @@ paths:
|
|||||||
description: |
|
description: |
|
||||||
The ID of the assistant to retrieve.
|
The ID of the assistant to retrieve.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: null
|
description: null
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -856,7 +855,7 @@ paths:
|
|||||||
|
|
||||||
|
|
||||||
response = requests.get(f'http://localhost:1337/v1/assistants/{assistant_id}', headers={'Content-Type': 'application/json'})
|
response = requests.get(f'http://localhost:1337/v1/assistants/{assistant_id}', headers={'Content-Type': 'application/json'})
|
||||||
'/threads/{thread_id}/messages':
|
"/threads/{thread_id}/messages":
|
||||||
get:
|
get:
|
||||||
operationId: listMessages
|
operationId: listMessages
|
||||||
tags:
|
tags:
|
||||||
@ -875,7 +874,7 @@ paths:
|
|||||||
description: |
|
description: |
|
||||||
The ID of the thread from which to retrieve messages.
|
The ID of the thread from which to retrieve messages.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: List of messages retrieved successfully
|
description: List of messages retrieved successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -927,7 +926,7 @@ paths:
|
|||||||
- role
|
- role
|
||||||
- content
|
- content
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Message created successfully
|
description: Message created successfully
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
@ -942,7 +941,7 @@ 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:
|
||||||
@ -969,7 +968,7 @@ paths:
|
|||||||
description: |
|
description: |
|
||||||
The ID of the message to retrieve.
|
The ID of the message to retrieve.
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user