Versions in this module Expand all Collapse all v0 v0.3.11 Aug 27, 2026 Changes in this version + const ChatDescriptor + const CredentialPurpose + const EmbedDescriptor + var ErrSecretShapedContent = errors.New("content is secret-shaped and cannot be sent through the provider broker") + func Manifest(origin Origin) (*manifest.Manifest, error) + func PlannedChat(m *manifest.Manifest, origin *providerv0.AdmittedOrigin, request ChatRequest, ...) (*providerv0.PlannedRequest, error) + func PlannedEmbed(m *manifest.Manifest, origin *providerv0.AdmittedOrigin, request EmbedRequest, ...) (*providerv0.PlannedRequest, error) + func ScreenContent(texts []string) error + type ChatDelta struct + EventType string + StopReason string + Terminal bool + Text string + Usage Usage + func DecodeEvent(event *providerv0.FilteredEvent) ChatDelta + type ChatRequest struct + MaxTokens int64 + Messages []Message + Model string + Stream bool + System string + Temperature string + func (r ChatRequest) Body() map[string]*providerv0.PublicValue + type ChatResponse struct + StopReason string + Text string + Usage Usage + func DecodeChat(response *providerv0.ExecuteRequestResponse) (*ChatResponse, error) + type ChatStream struct + Complete bool + Deltas []ChatDelta + StopReason string + Text string + Usage Usage + func DecodeChatStream(response *providerv0.ExecuteRequestResponse) (*ChatStream, error) + type Client struct + func NewClient(exec Executor) *Client + func (c *Client) Chat(ctx context.Context, request *providerv0.ExecuteRequestRequest) (*ChatResponse, error) + func (c *Client) ChatStream(ctx context.Context, request *providerv0.ExecuteRequestRequest) (*ChatStream, error) + func (c *Client) Embed(ctx context.Context, request *providerv0.ExecuteRequestRequest) (*EmbeddingResponse, error) + type EmbedRequest struct + Input []string + Model string + func (r EmbedRequest) Body() map[string]*providerv0.PublicValue + type Embedding []float64 + type EmbeddingResponse struct + Embeddings []Embedding + Usage Usage + func DecodeEmbedding(response *providerv0.ExecuteRequestResponse) (*EmbeddingResponse, error) + type Executor interface + Execute func(ctx context.Context, request *providerv0.ExecuteRequestRequest) (*providerv0.ExecuteRequestResponse, error) + type Message struct + Content string + Role string + type Origin struct + Class string + Host string + Port uint32 + Scheme string + func AnthropicOrigin() Origin + type Usage struct + InputTokens int64 + OutputTokens int64