Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Credential struct {
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"`
}
Expand Down
2 changes: 2 additions & 0 deletions gptscript_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,7 @@ func TestCredentials(t *testing.T) {
Type: CredentialTypeTool,
Env: map[string]string{"ENV": "testing"},
RefreshToken: "my-refresh-token",
CheckParam: "my-check-param",
})
require.NoError(t, err)

Expand All @@ -1732,6 +1733,7 @@ func TestCredentials(t *testing.T) {
require.Contains(t, cred.Env, "ENV")
require.Equal(t, cred.Env["ENV"], "testing")
require.Equal(t, cred.RefreshToken, "my-refresh-token")
require.Equal(t, cred.CheckParam, "my-check-param")

// Delete
err = g.DeleteCredential(context.Background(), "testing", name)
Expand Down