-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_args.go
40 lines (35 loc) · 982 Bytes
/
model_args.go
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
package types
import (
"time"
)
// GPTModel 1 openai大模型 2 讯飞星火大模型
type GPTModel int
const (
_ GPTModel = iota
OpenAIModel
SparkModel
)
type GPTModelArg struct {
Spark *SparkArg `json:"spark"`
Openapi *OpenapiArg `json:"openapi"`
}
type SparkArg struct {
WssDomain string `json:"wss_domain"`
AppID string `json:"app_id"`
AppSecret string `json:"app_secret"`
AppKey string `json:"app_key"`
}
type OpenapiArg struct {
APIKey string `json:"api_key"`
AutoPass bool `json:"auto_pass"`
SessionTimeout time.Duration `json:"session_timeout"`
MaxTokens uint `json:"max_tokens"`
Model string `json:"model"`
Temperature float64 `json:"temperature"`
ReplyPrefix string `json:"reply_prefix"`
SessionClearToken string `json:"session_clear_token"`
}
type Message struct {
Role string `json:"role"`
Content string `json:"content"`
}