Changeset 0.22.1 (#95)
This commit is contained in:
@@ -432,6 +432,14 @@ func (p *OpenAIProvider) doRequest(ctx context.Context, cfg ProviderConfig, req
|
||||
return nil, fmt.Errorf("marshal request: %w", err)
|
||||
}
|
||||
|
||||
// Merge hook-supplied extra fields into wire JSON (v0.22.1)
|
||||
if len(req.ExtraBody) > 0 {
|
||||
body, err = mergeExtraBody(body, req.ExtraBody)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("merge extra body: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
httpReq, err := http.NewRequestWithContext(ctx, "POST", endpoint, bytes.NewReader(body))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user