blob: 0d7ca4437eabcd45c38395932046baf2d7dc8138 (
plain)
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
|
package types
type Provider string
const (
Gemini Provider = "gemini"
// OpenAI Provider = "openai" // TODO: Add support for OpenAI in the future
)
type ServerConfig struct {
AuthorizationKey string
Port int
Provider Provider
Model string
APIKey string
}
type Identity struct {
ID string `json:"id,omitempty"`
Email string `json:"email,omitempty"`
Name string `json:"name,omitempty"`
}
type ComposeDetails struct {
Subject string `json:"subject,omitempty"`
To []string `json:"to,omitempty"`
Cc []string `json:"cc,omitempty"`
Bcc []string `json:"bcc,omitempty"`
BodyPlain string `json:"bodyPlain,omitempty"`
BodyHTML string `json:"bodyHTML,omitempty"`
IdentityID string `json:"identityId,omitempty"`
IsHTML bool `json:"isHTML"`
}
type ComposeContext struct {
Account Identity `json:"account"`
Compose ComposeDetails `json:"compose"`
}
type Payload struct {
Prompt string `json:"prompt"`
Context ComposeContext `json:"context"`
}
type SuccessResponse struct {
Response string `json:"response"`
Payload Payload `json:"payload"`
}
type ErrorResponse struct {
Error string `json:"error"`
}
|