办学质量监测教学评价系统
康鲁杰
昨天 3e9c71e2940d675e030ee29dbb70194c6e1102e4
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
declare namespace Chat {
 
    interface Chat {
        dateTime: string
        text: string
        inversion?: boolean
        error?: boolean
        loading?: boolean
        conversationOptions?: ConversationRequest | null
        requestOptions: { prompt: string; options?: ConversationRequest | null }
        model?:string //模型
        mjID?:string //MJ的ID
        opt?:{
            progress?:string,seed?:number, imageUrl?:string
            , status?:string, images?:string[]
            ,promptEn?:string,buttons?:any[]
            ,action?:string
            ,duration?:number
            ,lkey?:string
        } //
        uuid?:number
        index?:number
        myid?:string //唯一随机
        logo?:string
        
        //progress?:string
    }
 
    interface History {
        title: string
        isEdit: boolean
        uuid: number
    }
 
    interface ChatState {
        active: number | null
        usingContext: boolean;
        history: History[]
        chat: { uuid: number; data: Chat[] }[]
    }
 
    interface ConversationRequest {
        conversationId?: string
        parentMessageId?: string
    }
 
    interface ConversationResponse {
        conversationId: string
        detail: {
            choices: { finish_reason: string; index: number; logprobs: any; text: string }[]
            created: number
            id: string
            model: string
            object: string
            usage: { completion_tokens: number; prompt_tokens: number; total_tokens: number }
        }
        id: string
        parentMessageId: string
        role: string
        text: string
    }
}