Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway is an x402-enabled reverse proxy for LLM inference.
func NewGateway ¶
func NewGateway(cfg GatewayConfig) (*Gateway, error)
NewGateway creates a new inference gateway with the given configuration.
type GatewayConfig ¶
type GatewayConfig struct {
// ListenAddr is the address to listen on (e.g., ":8402").
ListenAddr string
// UpstreamURL is the upstream inference service URL (e.g., "http://localhost:11434").
UpstreamURL string
// WalletAddress is the USDC recipient address for payments.
WalletAddress string
// PricePerRequest is the USDC amount charged per inference request (e.g., "0.001").
PricePerRequest string
// Chain is the x402 chain configuration (e.g., x402.BaseMainnet).
Chain x402.ChainConfig
// FacilitatorURL is the x402 facilitator service URL.
FacilitatorURL string
}
GatewayConfig holds configuration for the x402 inference gateway.
Click to show internal directories.
Click to hide internal directories.