Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) ChatCompletions ¶
func (h *Handler) ChatCompletions(w http.ResponseWriter, r *http.Request)
func (*Handler) ProxyPassthrough ¶
func (h *Handler) ProxyPassthrough(w http.ResponseWriter, r *http.Request)
type Upstream ¶
type Upstream struct {
// contains filtered or unexported fields
}
func NewUpstream ¶
func (*Upstream) Forward ¶
func (u *Upstream) Forward(reqBody []byte, authHeader string) (*UpstreamResult, error)
Forward sends a non-streaming request to the upstream provider.
func (*Upstream) ForwardRaw ¶
ForwardRaw proxies any request directly to the upstream without parsing.
func (*Upstream) ForwardStream ¶
func (u *Upstream) ForwardStream(reqBody []byte, authHeader string, w http.ResponseWriter) (*UpstreamResult, error)
ForwardStream sends a streaming request and writes SSE chunks directly to the client. It collects the full response content and usage for logging.
type UpstreamResult ¶
Click to show internal directories.
Click to hide internal directories.