forked from gptscript-ai/go-gptscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcredentials.go
28 lines (23 loc) · 815 Bytes
/
credentials.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
package gptscript
import "time"
type CredentialType string
const (
CredentialTypeTool CredentialType = "tool"
CredentialTypeModelProvider CredentialType = "modelProvider"
)
type Credential struct {
Context string `json:"context"`
ToolName string `json:"toolName"`
Type CredentialType `json:"type"`
Env map[string]string `json:"env"`
Ephemeral bool `json:"ephemeral,omitempty"`
CheckParam string `json:"checkParam"`
ExpiresAt *time.Time `json:"expiresAt"`
RefreshToken string `json:"refreshToken"`
}
type CredentialRequest struct {
Content string `json:"content"`
AllContexts bool `json:"allContexts"`
Context []string `json:"context"`
Name string `json:"name"`
}