-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
45 lines (39 loc) · 1.13 KB
/
types.ts
File metadata and controls
45 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import {type PluginsCommonOptions } from "adminforth";
import { type CompletionAdapter } from "adminforth";
interface ISessionResource {
resourceId: string;
idField: string;
titleField: string;
turnsField: string;
askerIdField: string;
createdAtField: string;
}
interface ITurnResource {
resourceId: string;
idField: string;
sessionIdField: string;
createdAtField: string;
promptField: string;
responseField: string;
debugField?: string;
}
export interface PluginOptions extends PluginsCommonOptions {
/**
* Adapter instance that will be used to generate responses.
* You can use any adapter that implements the CompletionAdapter interface, for example the OpenAIAdapter included in adminforth,
* or create your own that fetches responses from your custom backend.
*/
completionAdapter: CompletionAdapter;
/**
* Max tokens for the generation.
* Default is 1000
*/
maxTokens?: number;
/**
* Response generation level.
* Default is low
*/
reasoning?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
sessionResource: ISessionResource;
turnResource: ITurnResource;
}