Skip to content
canisminor1990 edited this page Apr 8, 2023 · 1 revision

Module: client

Table of contents

Functions

Functions

createPrompt

createPrompt(props): PromptRequest

创建 Prompt 请求参数

Parameters

Name Type Description
props Object 参数对象
props.clientId? string -
props.customWidgets string[] -
props.graph PersistedGraph -
props.widgets Record<string, Widget> -

Returns

PromptRequest

Prompt 请求参数

Defined in

src/client.ts:54


deleteFromQueue

deleteFromQueue(id): Promise<void>

从队列中删除项

Parameters

Name Type Description
id number 队列项 id

Returns

Promise<void>

Defined in

src/client.ts:22


getHistory

getHistory(): Promise<History>

获取历史记录

Returns

Promise<History>

历史记录

Defined in

src/client.ts:33


getQueue

getQueue(): Promise<Queue>

获取队列

Returns

Promise<Queue>

队列

Defined in

src/client.ts:16


getWidgetLibrary

getWidgetLibrary(): Promise<Record<string, Widget>>

获取小部件库

Returns

Promise<Record<string, Widget>>

小部件库

Defined in

src/client.ts:9


sendPrompt

sendPrompt(prompt): Promise<PromptResponse>

发送 Prompt 请求

Parameters

Name Type Description
prompt PromptRequest Prompt 请求参数

Returns

Promise<PromptResponse>

Prompt 响应参数

Defined in

src/client.ts:40