You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constSUMMARIZER_SYSTEM_PROMPT=`You are a text summarizer. Your sole purpose is to receive text and provide a concise, factual summary of it. Do not add any commentary or analysis. Focus on the key information presented in the text.`;
13
+
14
+
exportclassSummarizationService{
15
+
constructor(){}
16
+
17
+
asyncsummarize(
18
+
tollResponseParts: GeminiPart[],
19
+
modelConfig: OllamaModelConfig|ModelConfig,
20
+
): Promise<string|null>{
21
+
if('host'inmodelConfig){
22
+
constuserParts: OllamaPart[]=[];
23
+
for(constpartoftollResponseParts){
24
+
if('functionResponse'inpart){
25
+
// Singe gemma can't handle function responses, we convert it into a string.
0 commit comments