Documentation
¶
Index ¶
- func New(coreProtocol core.Converter, route protocol.RouteSpec, opts protocol.Options) protocol.Protocol
- func NewAnthropic(opts protocol.Options) protocol.Protocol
- func NewGemini(opts protocol.Options) protocol.Protocol
- func NewOllama(opts protocol.Options) protocol.Protocol
- func NewOpenAIChat(opts protocol.Options) protocol.Protocol
- func NewOpenAIResponses(opts protocol.Options) protocol.Protocol
- type Adapter
- func (a *Adapter) BuildHTTPRequest(ctx context.Context, baseURL, token string, r *ir.Request) (*http.Request, error)
- func (a *Adapter) BuildRawHTTPRequest(ctx context.Context, baseURL, token, model string, stream bool, ...) (*http.Request, error)
- func (a *Adapter) DecodeRequest(c *gin.Context) (*ir.Request, error)
- func (a *Adapter) DecodeRequestBody(body []byte, path string) (*ir.Request, error)
- func (a *Adapter) DecodeResponse(body []byte) (*ir.Response, error)
- func (a *Adapter) Name() string
- func (a *Adapter) NewStreamReader(resp *http.Response) protocol.StreamReader
- func (a *Adapter) NewStreamWriter(c *gin.Context) protocol.StreamWriter
- func (a *Adapter) Route() protocol.RouteSpec
- func (a *Adapter) WriteResponse(c *gin.Context, r *ir.Response) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) BuildHTTPRequest ¶
func (*Adapter) BuildRawHTTPRequest ¶ added in v1.24.0
func (a *Adapter) BuildRawHTTPRequest(ctx context.Context, baseURL, token, model string, stream bool, source *http.Request, body []byte) (*http.Request, error)
BuildRawHTTPRequest applies transport settings without decoding protocol content.
func (*Adapter) DecodeRequest ¶
func (*Adapter) DecodeRequestBody ¶
DecodeRequestBody decodes a source-protocol request without requiring a Gin context. It is used by transports such as the Responses WebSocket endpoint that receive request payloads as WebSocket messages instead of HTTP bodies.
func (*Adapter) DecodeResponse ¶
func (*Adapter) NewStreamReader ¶
func (a *Adapter) NewStreamReader(resp *http.Response) protocol.StreamReader
Source Files
¶
- adapter.go
- passthrough.go
Click to show internal directories.
Click to hide internal directories.