Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
func NewHTTPClient(roundTripper HTTPRoundTripper, timeout time.Duration) *http.Client
NewHTTPClient creates an HTTP client with an optional custom round tripper.
Types ¶
type BedrockTransport ¶
type BedrockTransport struct {
// contains filtered or unexported fields
}
BedrockTransport uses AWS Bedrock for Anthropic models.
func NewBedrockTransport ¶
func NewBedrockTransport(apiKey string, config *Config) (*BedrockTransport, error)
func (*BedrockTransport) Close ¶
func (t *BedrockTransport) Close() error
func (*BedrockTransport) CreateMessage ¶
func (t *BedrockTransport) CreateMessage(ctx context.Context, req types.APIRequest) (*types.APIResponse, error)
func (*BedrockTransport) CreateMessageStream ¶
func (t *BedrockTransport) CreateMessageStream(ctx context.Context, req types.APIRequest) (<-chan types.APIResponseChunk, error)
type Config ¶
type Config struct {
Provider types.APIProvider
BaseURL string
Region string
ProjectID string
}
Config is the transport-facing provider configuration subset.
type FoundryTransport ¶
type FoundryTransport struct {
// contains filtered or unexported fields
}
FoundryTransport uses Azure Foundry for Anthropic models.
func NewFoundryTransport ¶
func NewFoundryTransport(apiKey string, config *Config) (*FoundryTransport, error)
func (*FoundryTransport) Close ¶
func (t *FoundryTransport) Close() error
func (*FoundryTransport) CreateMessage ¶
func (t *FoundryTransport) CreateMessage(ctx context.Context, req types.APIRequest) (*types.APIResponse, error)
func (*FoundryTransport) CreateMessageStream ¶
func (t *FoundryTransport) CreateMessageStream(ctx context.Context, req types.APIRequest) (<-chan types.APIResponseChunk, error)
type HTTPRoundTripper ¶
type HTTPRoundTripper = http.RoundTripper
HTTPRoundTripper is the transport-level round tripper contract used by provider clients.
type Transport ¶
type Transport interface {
CreateMessage(ctx context.Context, req types.APIRequest) (*types.APIResponse, error)
CreateMessageStream(ctx context.Context, req types.APIRequest) (<-chan types.APIResponseChunk, error)
Close() error
}
Transport is an interface for provider-specific API transports.
type VertexTransport ¶
type VertexTransport struct {
// contains filtered or unexported fields
}
VertexTransport uses Google Vertex AI for Anthropic models.
func NewVertexTransport ¶
func NewVertexTransport(apiKey string, config *Config) (*VertexTransport, error)
func (*VertexTransport) Close ¶
func (t *VertexTransport) Close() error
func (*VertexTransport) CreateMessage ¶
func (t *VertexTransport) CreateMessage(ctx context.Context, req types.APIRequest) (*types.APIResponse, error)
func (*VertexTransport) CreateMessageStream ¶
func (t *VertexTransport) CreateMessageStream(ctx context.Context, req types.APIRequest) (<-chan types.APIResponseChunk, error)
Click to show internal directories.
Click to hide internal directories.