generated from Amery2010/nextjs-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 236
/
types.d.ts
88 lines (81 loc) · 1.75 KB
/
types.d.ts
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import type { Content } from '@google/generative-ai'
declare global {
interface Message extends Content {
id: string
attachments?: FileInfor[]
}
interface Setting {
password: string
apiKey: string
apiProxy: string
model: string
lang: string
sttLang: string
ttsLang: string
ttsVoice: string
isProtected: boolean
talkMode: 'chat' | 'voice'
maxHistoryLength: number
assistantIndexUrl: string
uploadProxy: string
topP: number
topK: number
temperature: number
maxOutputTokens: number
safety: string
autoStopRecord: boolean
}
interface Assistant {
author: string
createAt: string
homepage: string
identifier: string
meta: {
avatar: string
tags: string[]
title: string
description: string
}
schemaVersion: number
}
interface AssistantDetail extends Assistant {
config: {
systemRole: string
}
}
interface FileMetadata {
name: string
displayName?: string
mimeType: string
sizeBytes: string
createTime: string
updateTime: string
expirationTime: string
sha256Hash: string
uri: string
state: 'STATE_UNSPECIFIED' | 'PROCESSING' | 'ACTIVE' | 'FAILED'
}
interface FileInfor {
id: string
name: string
mimeType: string
size: number
preview?: string
metadata?: FileMetadata
status: 'STATE_UNSPECIFIED' | 'PROCESSING' | 'ACTIVE' | 'FAILED'
}
interface Model {
name: string
baseModelId: string
version: string
displayName: string
description: string
inputTokenLimit: number
outputTokenLimit: number
supportedGenerationMethods: string[]
temperature: number
maxTemperature: number
topP: number
topK: number
}
}