diff options
| author | Bobby <[email protected]> | 2025-09-24 19:50:14 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2025-09-24 19:50:14 +0530 |
| commit | 935d3a22363cac775d0f5f6757367ffbecf5183f (patch) | |
| tree | 687dfa53a89eeea2d4390d39dad0a488bc37e5d0 /types | |
| parent | a42336fec9c5ed6cd47e7dc0437c931ae06cfc0a (diff) | |
| download | thunderbird-ai-compose-server-935d3a22363cac775d0f5f6757367ffbecf5183f.tar.xz thunderbird-ai-compose-server-935d3a22363cac775d0f5f6757367ffbecf5183f.zip | |
added gemini generator. cleaned up folder structure
Diffstat (limited to 'types')
| -rw-r--r-- | types/types.go | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/types/types.go b/types/types.go new file mode 100644 index 0000000..955d085 --- /dev/null +++ b/types/types.go @@ -0,0 +1,51 @@ +package types + +type Provider string + +const ( + Gemini Provider = "gemini" + // OpenAI Provider = "openai" // TODO: Add support for OpenAI in the future +) + +type ServerConfig struct { + 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"` +} |
