mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat: chat api
This commit is contained in:
+29
-42
@@ -1,67 +1,51 @@
|
||||
definitions:
|
||||
chat.ChatRequest:
|
||||
properties:
|
||||
current_platform:
|
||||
type: string
|
||||
language:
|
||||
type: string
|
||||
locale:
|
||||
type: string
|
||||
max_context_load_time:
|
||||
type: integer
|
||||
max_steps:
|
||||
type: integer
|
||||
messages:
|
||||
items:
|
||||
$ref: '#/definitions/chat.Message'
|
||||
$ref: '#/definitions/chat.GatewayMessage'
|
||||
type: array
|
||||
model:
|
||||
description: 'optional: specific model to use'
|
||||
type: string
|
||||
platforms:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
provider:
|
||||
description: 'optional: specific provider to use'
|
||||
type: string
|
||||
stream:
|
||||
type: boolean
|
||||
query:
|
||||
type: string
|
||||
type: object
|
||||
chat.ChatResponse:
|
||||
properties:
|
||||
finish_reason:
|
||||
type: string
|
||||
message:
|
||||
$ref: '#/definitions/chat.Message'
|
||||
model:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
usage:
|
||||
$ref: '#/definitions/chat.Usage'
|
||||
type: object
|
||||
chat.Message:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
role:
|
||||
description: user, assistant, system
|
||||
type: string
|
||||
type: object
|
||||
chat.StreamChunk:
|
||||
properties:
|
||||
delta:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
type: object
|
||||
finish_reason:
|
||||
type: string
|
||||
messages:
|
||||
items:
|
||||
$ref: '#/definitions/chat.GatewayMessage'
|
||||
type: array
|
||||
model:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
type: object
|
||||
chat.Usage:
|
||||
properties:
|
||||
completion_tokens:
|
||||
type: integer
|
||||
prompt_tokens:
|
||||
type: integer
|
||||
total_tokens:
|
||||
type: integer
|
||||
chat.GatewayMessage:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
handlers.CreateContainerRequest:
|
||||
properties:
|
||||
container_id:
|
||||
type: string
|
||||
image:
|
||||
type: string
|
||||
snapshotter:
|
||||
type: string
|
||||
type: object
|
||||
@@ -553,7 +537,10 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/chat.StreamChunk'
|
||||
items:
|
||||
format: int32
|
||||
type: integer
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
|
||||
Reference in New Issue
Block a user