Documentation
¶
Index ¶
- func DecodeHTTPRequest(input DecodeRequestInput) (*http.Request, error)
- func DecodeHTTPResponse(ctx context.Context, input DecodeResponseInput) *http.Response
- func EncodeHTTPResponse(ctx context.Context, events <-chan ir.Event, stream bool, ...) <-chan EncodedChunk
- func EventsWithContext(ctx context.Context, events <-chan ir.Event) <-chan ir.Event
- func JoinUpstreamURL(baseURL, path string) (string, error)
- func MergeHeaders(base http.Header, overrides map[string][]string) map[string][]string
- type DecodeRequestInput
- type DecodeResponseInput
- type EncodeRequestInput
- type EncodeResponseInput
- type EncodedChunk
- type EncodedRequest
- type Endpoint
- type Handler
- type RouteKey
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeHTTPRequest ¶
func DecodeHTTPRequest(input DecodeRequestInput) (*http.Request, error)
func DecodeHTTPResponse ¶
func DecodeHTTPResponse(ctx context.Context, input DecodeResponseInput) *http.Response
func EncodeHTTPResponse ¶
func EventsWithContext ¶
func JoinUpstreamURL ¶
Types ¶
type DecodeRequestInput ¶
type DecodeResponseInput ¶
type EncodeRequestInput ¶
type EncodeResponseInput ¶
type EncodedChunk ¶
type EncodedRequest ¶
type Handler ¶
type Handler interface {
DecodeRequest(DecodeRequestInput) (*ir.Request, error)
EncodeRequest(EncodeRequestInput) (EncodedRequest, any, error)
DecodeResponse(context.Context, DecodeResponseInput, any) (<-chan ir.Event, error)
EncodeResponse(context.Context, EncodeResponseInput) (<-chan EncodedChunk, error)
Endpoints() []Endpoint
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package claude implements the Anthropic Claude Messages API protocol codec.
|
Package claude implements the Anthropic Claude Messages API protocol codec. |
|
openai
|
|
|
chat
Package chat implements the OpenAI Chat Completions protocol codec.
|
Package chat implements the OpenAI Chat Completions protocol codec. |
|
responses
Package responses implements the OpenAI Responses API protocol codec.
|
Package responses implements the OpenAI Responses API protocol codec. |
Click to show internal directories.
Click to hide internal directories.