(ctx context.Context, from, to sdktranslator.Format, model string, body []byte, stream bool)
| 1878 | } |
| 1879 | |
| 1880 | func (h *Host) NormalizeRequest(ctx context.Context, from, to sdktranslator.Format, model string, body []byte, stream bool) []byte { |
| 1881 | current := bytes.Clone(body) |
| 1882 | for _, record := range h.activeRecords() { |
| 1883 | if h.isPluginFused(record.id) || record.plugin.Capabilities.RequestNormalizer == nil { |
| 1884 | continue |
| 1885 | } |
| 1886 | if normalized, ok := h.callRequestNormalizer(ctx, record, from, to, model, current, stream); ok { |
| 1887 | current = normalized |
| 1888 | } |
| 1889 | } |
| 1890 | return current |
| 1891 | } |
| 1892 | |
| 1893 | func (h *Host) TranslateRequest(ctx context.Context, from, to sdktranslator.Format, model string, body []byte, stream bool) ([]byte, bool) { |
| 1894 | for _, record := range h.activeRecords() { |
nothing calls this directly
no test coverage detected