Documentation
¶
Index ¶
Constants ¶
View Source
const ( ConfigFileEnv = "LANGSMITH_CONFIG_FILE" DefaultAPIURL = "https://api.smith.langchain.com" )
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
DefaultConfigPath returns the LangSmith CLI config path.
func MaskSecret ¶
MaskSecret returns a redacted value suitable for CLI output.
Types ¶
type Config ¶
type Config struct {
CurrentProfile string `json:"current_profile,omitempty"`
Profiles map[string]Profile `json:"profiles,omitempty"`
}
Config is the on-disk LangSmith CLI config.
func (*Config) ResolveProfile ¶
ResolveProfile returns the active profile by precedence.
func (*Config) ResolveProfileName ¶
ResolveProfileName returns the active profile name by precedence.
type OAuth ¶
type OAuth struct {
AccessToken string `json:"access_token,omitempty"`
RefreshToken string `json:"refresh_token,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
}
OAuth stores OAuth tokens written by `langsmith login`.
type Profile ¶
type Profile struct {
APIKey string `json:"api_key,omitempty"`
APIURL string `json:"api_url,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
OAuth OAuth `json:"oauth,omitempty"`
}
Profile represents one named LangSmith CLI profile.
func (Profile) AccessToken ¶
AccessToken returns the OAuth access token to use for bearer auth.
func (Profile) TokenExpiresAtTime ¶
TokenExpiresAtTime parses oauth.expires_at.
Click to show internal directories.
Click to hide internal directories.