Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caller ¶
type Caller struct {
// APIKey is the legacy "pk_xxx:sk_xxx" form, retained for tests and
// callers that want to inspect a single string. New code should rely
// on PublicKey/SecretKey/BearerToken instead.
APIKey string
PublicKey string
SecretKey string
BearerToken string
BaseURL string
// contains filtered or unexported fields
}
Caller makes raw HTTP requests to the API for endpoints where the SDK does not decode response bodies. It carries the active profile so it can transparently refresh OAuth tokens on 401 responses.
For api-key profiles the Caller stores the public/secret key pair and emits dual headers (X-PromptVM-Public-Key + X-PromptVM-Secret-Key) on each request. For OAuth profiles only BearerToken is set, sent as Authorization: Bearer <token>.
func NewFromContext ¶
NewFromContext creates a Caller from CLI flags, environment, and the active config profile.
Credential resolution mirrors internal/client.ResolveCredentials so the SDK and the raw HTTP path always agree on which key set to use.