File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ export class LiteLLMHandler extends RouterProvider implements SingleCompletionHa
5454 type : "text" ,
5555 text : systemPrompt ,
5656 cache_control : { type : "ephemeral" } ,
57- } ,
57+ } as any ,
5858 ] ,
59- } as OpenAI . Chat . ChatCompletionSystemMessageParam
59+ }
6060
6161 // Find the last two user messages to apply caching
6262 const userMsgIndices = openAiMessages . reduce (
@@ -78,7 +78,7 @@ export class LiteLLMHandler extends RouterProvider implements SingleCompletionHa
7878 type : "text" ,
7979 text : message . content ,
8080 cache_control : { type : "ephemeral" } ,
81- } ,
81+ } as any ,
8282 ] ,
8383 }
8484 } else if ( Array . isArray ( message . content ) ) {
@@ -87,10 +87,10 @@ export class LiteLLMHandler extends RouterProvider implements SingleCompletionHa
8787 ...message ,
8888 content : message . content . map ( ( content , contentIndex ) =>
8989 contentIndex === message . content . length - 1
90- ? {
90+ ? ( {
9191 ...content ,
9292 cache_control : { type : "ephemeral" } ,
93- }
93+ } as any )
9494 : content ,
9595 ) ,
9696 }
You can’t perform that action at this time.
0 commit comments