mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
add instruction and existingCompetitors params to streaming enrichment
This commit is contained in:
parent
0a88980aa4
commit
00bc862030
1 changed files with 4 additions and 1 deletions
|
|
@ -5601,12 +5601,15 @@ export const enrichPolicyTemplateStream = async (
|
|||
competitor_variations: Record<string, string[]>;
|
||||
guardrailDefinitions: any[];
|
||||
}) => void,
|
||||
onError?: (error: string) => void
|
||||
onError?: (error: string) => void,
|
||||
options?: { instruction?: string; existingCompetitors?: string[] }
|
||||
) => {
|
||||
const url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/policy/templates/enrich/stream`
|
||||
: `/policy/templates/enrich/stream`;
|
||||
const body: any = { template_id: templateId, parameters, model };
|
||||
if (options?.instruction) body.instruction = options.instruction;
|
||||
if (options?.existingCompetitors) body.competitors = options.existingCompetitors;
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: "POST",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue