Something went wrong. Try again.
sloproxy
Something went wrong. Try again.
814 B · 12 lines
Go
at main
12345678910111213package translator
import "context"
// PluginHooks defines optional translator extension hooks provided by plugins.type PluginHooks interface { NormalizeRequest(ctx context.Context, from, to Format, model string, body []byte, stream bool) []byte TranslateRequest(ctx context.Context, from, to Format, model string, body []byte, stream bool) ([]byte, bool) NormalizeResponseBefore(ctx context.Context, from, to Format, model string, originalRequestRawJSON, requestRawJSON, body []byte, stream bool) []byte TranslateResponse(ctx context.Context, from, to Format, model string, originalRequestRawJSON, requestRawJSON, body []byte, stream bool) ([]byte, bool) NormalizeResponseAfter(ctx context.Context, from, to Format, model string, originalRequestRawJSON, requestRawJSON, body []byte, stream bool) []byte}