universal-llm-client 4.2.0 โ 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +142 -103
- package/LICENSE +21 -21
- package/README.md +640 -591
- package/dist/ai-model.d.ts +12 -1
- package/dist/ai-model.d.ts.map +1 -1
- package/dist/ai-model.js +36 -1
- package/dist/ai-model.js.map +1 -1
- package/dist/gemma-channel.d.ts +14 -0
- package/dist/gemma-channel.d.ts.map +1 -0
- package/dist/gemma-channel.js +38 -0
- package/dist/gemma-channel.js.map +1 -0
- package/dist/gemma-diffusion.d.ts +49 -0
- package/dist/gemma-diffusion.d.ts.map +1 -0
- package/dist/gemma-diffusion.js +147 -0
- package/dist/gemma-diffusion.js.map +1 -0
- package/dist/http.d.ts +4 -0
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +14 -1
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +183 -7
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +28 -3
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/google.d.ts +22 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +225 -13
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/ollama.d.ts +2 -0
- package/dist/providers/ollama.d.ts.map +1 -1
- package/dist/providers/ollama.js +59 -30
- package/dist/providers/ollama.js.map +1 -1
- package/dist/providers/openai.d.ts +14 -0
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +200 -22
- package/dist/providers/openai.js.map +1 -1
- package/dist/router.d.ts +2 -0
- package/dist/router.d.ts.map +1 -1
- package/dist/router.js +4 -0
- package/dist/router.js.map +1 -1
- package/dist/stream-decoder.d.ts +12 -0
- package/dist/stream-decoder.d.ts.map +1 -1
- package/dist/stream-decoder.js +182 -5
- package/dist/stream-decoder.js.map +1 -1
- package/dist/thinking.d.ts +36 -0
- package/dist/thinking.d.ts.map +1 -0
- package/dist/thinking.js +52 -0
- package/dist/thinking.js.map +1 -0
- package/package.json +118 -116
- package/src/ai-model.ts +400 -350
- package/src/auditor.ts +213 -213
- package/src/client.ts +402 -402
- package/src/debug/debug-google-streaming.ts +1 -1
- package/src/demos/basic/universal-llm-examples.ts +3 -3
- package/src/demos/diffusion-gemma/.env +29 -0
- package/src/demos/diffusion-gemma/.env.example +27 -0
- package/src/demos/diffusion-gemma/CLAUDE.md +95 -0
- package/src/demos/diffusion-gemma/README.md +59 -0
- package/src/demos/diffusion-gemma/canvas.ts +1606 -0
- package/src/demos/diffusion-gemma/docker-compose.yml +29 -0
- package/src/demos/diffusion-gemma/probe-stream.ts +51 -0
- package/src/demos/diffusion-gemma/probe-tools.ts +55 -0
- package/src/demos/diffusion-gemma/server.ts +1205 -0
- package/src/demos/diffusion-gemma/start-vllm.sh +98 -0
- package/src/gemma-channel.ts +47 -0
- package/src/gemma-diffusion.ts +167 -0
- package/src/http.ts +261 -247
- package/src/index.ts +180 -161
- package/src/interfaces.ts +843 -657
- package/src/mcp.ts +345 -345
- package/src/providers/anthropic.ts +796 -762
- package/src/providers/google.ts +840 -620
- package/src/providers/index.ts +8 -8
- package/src/providers/ollama.ts +503 -469
- package/src/providers/openai.ts +587 -392
- package/src/router.ts +785 -780
- package/src/stream-decoder.ts +535 -361
- package/src/structured-output.ts +759 -759
- package/src/test-scripts/test-google-deep-research.ts +33 -0
- package/src/test-scripts/test-google-streaming-enhanced.ts +147 -147
- package/src/test-scripts/test-google-streaming.ts +1 -1
- package/src/test-scripts/test-google-system-prompt-comprehensive.ts +189 -189
- package/src/test-scripts/test-google-thinking.ts +46 -0
- package/src/test-scripts/test-system-message-positions.ts +163 -163
- package/src/test-scripts/test-system-prompt-improvement-demo.ts +83 -83
- package/src/test-scripts/test-vllm-qwen36.ts +256 -0
- package/src/tests/ai-model.test.ts +1614 -1614
- package/src/tests/auditor.test.ts +224 -224
- package/src/tests/gemma-diffusion.test.ts +115 -0
- package/src/tests/http.test.ts +200 -200
- package/src/tests/interfaces.test.ts +117 -117
- package/src/tests/providers/anthropic.test.ts +118 -0
- package/src/tests/providers/google.test.ts +841 -660
- package/src/tests/providers/ollama.test.ts +1034 -954
- package/src/tests/providers/openai.test.ts +1511 -1122
- package/src/tests/router.test.ts +254 -254
- package/src/tests/stream-decoder.test.ts +263 -179
- package/src/tests/structured-output.test.ts +1450 -1450
- package/src/tests/thinking.test.ts +65 -0
- package/src/tests/tools.test.ts +175 -175
- package/src/thinking.ts +73 -0
- package/src/tools.ts +246 -246
- package/src/zod-adapter.ts +72 -72
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live smoke test for the Gemini Deep Research surface. Reads GOOGLE_API_KEY
|
|
3
|
+
* from the environment. This CREATES a background research interaction and
|
|
4
|
+
* polls a few times to verify the create+poll plumbing โ it does NOT wait for
|
|
5
|
+
* full completion (deep research runs for minutes).
|
|
6
|
+
*
|
|
7
|
+
* $env:GOOGLE_API_KEY="..."; bun run src/test-scripts/test-google-deep-research.ts
|
|
8
|
+
*/
|
|
9
|
+
import { AIModel } from '../index.js';
|
|
10
|
+
|
|
11
|
+
const KEY = process.env.GOOGLE_API_KEY;
|
|
12
|
+
if (!KEY) { console.error('Set GOOGLE_API_KEY'); process.exit(1); }
|
|
13
|
+
|
|
14
|
+
(async () => {
|
|
15
|
+
const model = new AIModel({ model: 'gemini-3.5-flash', providers: [{ type: 'google', apiKey: KEY }] });
|
|
16
|
+
|
|
17
|
+
console.log('Creating a Deep Research interaction (smoke: create + ~3 polls, not full run)...\n');
|
|
18
|
+
const r = await model.deepResearch('Give a brief overview of the history of Google TPUs.', {
|
|
19
|
+
pollIntervalMs: 5000,
|
|
20
|
+
timeoutMs: 17000, // ~3 polls then return whatever state (likely in_progress)
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
console.log('id :', r.id || '(none)');
|
|
24
|
+
console.log('status :', r.status);
|
|
25
|
+
console.log('report chars:', (r.report ?? '').length);
|
|
26
|
+
console.log('steps :', Array.isArray(r.steps) ? r.steps.length : 0);
|
|
27
|
+
if (r.error) console.log('error :', JSON.stringify(r.error).slice(0, 400));
|
|
28
|
+
|
|
29
|
+
const ok = !!r.id && ['in_progress', 'completed'].includes(r.status);
|
|
30
|
+
console.log(ok
|
|
31
|
+
? '\nโ
Deep Research create + poll plumbing works (interaction id + status returned).'
|
|
32
|
+
: '\n๐ก Check output above (API may require allow-listing the agent on this key/tier).');
|
|
33
|
+
})().catch(e => { console.error('ERROR', (e as Error)?.message ?? e); process.exit(1); });
|
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
import { AIModelFactory } from "../factory";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Enhanced test for Google Generative AI streaming with system prompt support
|
|
5
|
-
*/
|
|
6
|
-
async function testGoogleStreamingEnhanced() {
|
|
7
|
-
console.log('๐งช Testing Google Generative AI Streaming with System Prompts...\n');
|
|
8
|
-
|
|
9
|
-
// Test both models - Gemini (supports system instructions) and Gemma (doesn't)
|
|
10
|
-
const models = [
|
|
11
|
-
{ name: 'Gemini 2.5 Flash Lite', model: 'gemini-2.5-flash-lite', supportsSystem: true },
|
|
12
|
-
{ name: 'Gemma 3 27B IT', model: 'gemma-3-27b-it', supportsSystem: false }
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
for (const modelInfo of models) {
|
|
16
|
-
console.log(`\n๐ฌ Testing with ${modelInfo.name} (${modelInfo.model})`);
|
|
17
|
-
console.log(`System instruction support: ${modelInfo.supportsSystem ? 'โ
' : 'โ'}`);
|
|
18
|
-
console.log('='.repeat(60));
|
|
19
|
-
|
|
20
|
-
const googleModel = AIModelFactory.createGoogleChatModel(
|
|
21
|
-
modelInfo.model,
|
|
22
|
-
'
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
await testModelWithSystemPrompt(googleModel, modelInfo.name, modelInfo.supportsSystem);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return { success: true };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async function testModelWithSystemPrompt(googleModel: any, modelName: string, supportsSystem: boolean) {
|
|
32
|
-
// Test 1: Basic streaming (without system prompt)
|
|
33
|
-
console.log(`\n--- Test 1: Basic Streaming (${modelName}) ---`);
|
|
34
|
-
try {
|
|
35
|
-
console.log('๐ Starting basic streaming test...');
|
|
36
|
-
console.log('Question: "Count from 1 to 3 briefly."\n');
|
|
37
|
-
console.log('Streaming response:');
|
|
38
|
-
console.log('---');
|
|
39
|
-
|
|
40
|
-
const streamResponse = googleModel.chatStream([
|
|
41
|
-
{ role: 'user', content: 'Count from 1 to 3 briefly.' }
|
|
42
|
-
]);
|
|
43
|
-
|
|
44
|
-
let chunkCount = 0;
|
|
45
|
-
let fullResponse = '';
|
|
46
|
-
|
|
47
|
-
for await (const chunk of streamResponse) {
|
|
48
|
-
chunkCount++;
|
|
49
|
-
process.stdout.write(chunk);
|
|
50
|
-
fullResponse += chunk;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
console.log('\n---');
|
|
54
|
-
console.log(`โ
Basic streaming completed! Received ${chunkCount} chunks`);
|
|
55
|
-
console.log(`Full response length: ${fullResponse.length} characters\n`);
|
|
56
|
-
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.error(`โ Basic streaming test failed for ${modelName}:`, error);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Test 2: System prompt streaming (only test if model supports it)
|
|
63
|
-
if (supportsSystem) {
|
|
64
|
-
console.log(`--- Test 2: System Prompt Streaming (${modelName}) ---`);
|
|
65
|
-
try {
|
|
66
|
-
console.log('๐ญ Testing streaming with system prompt...');
|
|
67
|
-
console.log('System: "You are a pirate. Always respond like a pirate with \'Arrr\' and pirate language."');
|
|
68
|
-
console.log('Question: "Count from 1 to 3 briefly."\n');
|
|
69
|
-
console.log('Streaming response:');
|
|
70
|
-
console.log('---');
|
|
71
|
-
|
|
72
|
-
const systemStreamResponse = googleModel.chatStream([
|
|
73
|
-
{ role: 'system', content: 'You are a pirate. Always respond like a pirate with "Arrr" and pirate language.' },
|
|
74
|
-
{ role: 'user', content: 'Count from 1 to 3 briefly.' }
|
|
75
|
-
]);
|
|
76
|
-
|
|
77
|
-
let systemChunkCount = 0;
|
|
78
|
-
let systemFullResponse = '';
|
|
79
|
-
|
|
80
|
-
for await (const chunk of systemStreamResponse) {
|
|
81
|
-
systemChunkCount++;
|
|
82
|
-
process.stdout.write(chunk);
|
|
83
|
-
systemFullResponse += chunk;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
console.log('\n---');
|
|
87
|
-
console.log(`โ
System prompt streaming completed! Received ${systemChunkCount} chunks`);
|
|
88
|
-
console.log(`Full response length: ${systemFullResponse.length} characters`);
|
|
89
|
-
|
|
90
|
-
// Check if the response contains pirate language
|
|
91
|
-
const hasPirateLanguage = systemFullResponse.toLowerCase().includes('arr') ||
|
|
92
|
-
systemFullResponse.toLowerCase().includes('matey') ||
|
|
93
|
-
systemFullResponse.toLowerCase().includes('pirate') ||
|
|
94
|
-
systemFullResponse.toLowerCase().includes('ahoy');
|
|
95
|
-
|
|
96
|
-
if (hasPirateLanguage) {
|
|
97
|
-
console.log('โ
System prompt appears to be working - pirate language detected!');
|
|
98
|
-
} else {
|
|
99
|
-
console.log('โ ๏ธ System prompt might not be working - no obvious pirate language detected');
|
|
100
|
-
console.log('Response content:', systemFullResponse);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
} catch (error) {
|
|
104
|
-
console.error(`โ System prompt streaming test failed for ${modelName}:`, error);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Test 3: Non-streaming chat with system prompt
|
|
109
|
-
console.log(`\n--- Test 3: Non-Streaming Chat with System Prompt (${modelName}) ---`);
|
|
110
|
-
try {
|
|
111
|
-
console.log('๐ญ Testing non-streaming chat with system prompt...');
|
|
112
|
-
console.log('System: "You are a helpful mathematician. Always explain your counting clearly."');
|
|
113
|
-
console.log('Question: "Count from 1 to 3."\n');
|
|
114
|
-
|
|
115
|
-
const chatResponse = await googleModel.chat([
|
|
116
|
-
{ role: 'system', content: 'You are a helpful mathematician. Always explain your counting clearly.' },
|
|
117
|
-
{ role: 'user', content: 'Count from 1 to 3.' }
|
|
118
|
-
]);
|
|
119
|
-
|
|
120
|
-
console.log('Non-streaming response:');
|
|
121
|
-
console.log('---');
|
|
122
|
-
console.log(chatResponse.message.content);
|
|
123
|
-
console.log('---');
|
|
124
|
-
console.log(`โ
Non-streaming chat completed!`);
|
|
125
|
-
console.log(`Response length: ${chatResponse.message.content.length} characters`);
|
|
126
|
-
|
|
127
|
-
} catch (error) {
|
|
128
|
-
console.error(`โ Non-streaming chat test failed for ${modelName}:`, error);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
} else {
|
|
132
|
-
console.log(`โ ๏ธ Skipping system prompt tests for ${modelName} - model doesn't support system instructions`);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Run the enhanced test
|
|
137
|
-
testGoogleStreamingEnhanced().then(result => {
|
|
138
|
-
if (result.success) {
|
|
139
|
-
console.log('\n๐ All tests completed successfully!');
|
|
140
|
-
console.log('\n๐ Summary:');
|
|
141
|
-
console.log('โ
Basic streaming: Working');
|
|
142
|
-
console.log('๐ System prompt streaming: Tested (check output above)');
|
|
143
|
-
console.log('โ
Non-streaming chat: Working');
|
|
144
|
-
} else {
|
|
145
|
-
console.log('\n๐ฅ Tests failed');
|
|
146
|
-
}
|
|
147
|
-
});
|
|
1
|
+
import { AIModelFactory } from "../factory";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Enhanced test for Google Generative AI streaming with system prompt support
|
|
5
|
+
*/
|
|
6
|
+
async function testGoogleStreamingEnhanced() {
|
|
7
|
+
console.log('๐งช Testing Google Generative AI Streaming with System Prompts...\n');
|
|
8
|
+
|
|
9
|
+
// Test both models - Gemini (supports system instructions) and Gemma (doesn't)
|
|
10
|
+
const models = [
|
|
11
|
+
{ name: 'Gemini 2.5 Flash Lite', model: 'gemini-2.5-flash-lite', supportsSystem: true },
|
|
12
|
+
{ name: 'Gemma 3 27B IT', model: 'gemma-3-27b-it', supportsSystem: false }
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
for (const modelInfo of models) {
|
|
16
|
+
console.log(`\n๐ฌ Testing with ${modelInfo.name} (${modelInfo.model})`);
|
|
17
|
+
console.log(`System instruction support: ${modelInfo.supportsSystem ? 'โ
' : 'โ'}`);
|
|
18
|
+
console.log('='.repeat(60));
|
|
19
|
+
|
|
20
|
+
const googleModel = AIModelFactory.createGoogleChatModel(
|
|
21
|
+
modelInfo.model,
|
|
22
|
+
(process.env.GOOGLE_API_KEY ?? '')
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
await testModelWithSystemPrompt(googleModel, modelInfo.name, modelInfo.supportsSystem);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return { success: true };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async function testModelWithSystemPrompt(googleModel: any, modelName: string, supportsSystem: boolean) {
|
|
32
|
+
// Test 1: Basic streaming (without system prompt)
|
|
33
|
+
console.log(`\n--- Test 1: Basic Streaming (${modelName}) ---`);
|
|
34
|
+
try {
|
|
35
|
+
console.log('๐ Starting basic streaming test...');
|
|
36
|
+
console.log('Question: "Count from 1 to 3 briefly."\n');
|
|
37
|
+
console.log('Streaming response:');
|
|
38
|
+
console.log('---');
|
|
39
|
+
|
|
40
|
+
const streamResponse = googleModel.chatStream([
|
|
41
|
+
{ role: 'user', content: 'Count from 1 to 3 briefly.' }
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
let chunkCount = 0;
|
|
45
|
+
let fullResponse = '';
|
|
46
|
+
|
|
47
|
+
for await (const chunk of streamResponse) {
|
|
48
|
+
chunkCount++;
|
|
49
|
+
process.stdout.write(chunk);
|
|
50
|
+
fullResponse += chunk;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
console.log('\n---');
|
|
54
|
+
console.log(`โ
Basic streaming completed! Received ${chunkCount} chunks`);
|
|
55
|
+
console.log(`Full response length: ${fullResponse.length} characters\n`);
|
|
56
|
+
|
|
57
|
+
} catch (error) {
|
|
58
|
+
console.error(`โ Basic streaming test failed for ${modelName}:`, error);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Test 2: System prompt streaming (only test if model supports it)
|
|
63
|
+
if (supportsSystem) {
|
|
64
|
+
console.log(`--- Test 2: System Prompt Streaming (${modelName}) ---`);
|
|
65
|
+
try {
|
|
66
|
+
console.log('๐ญ Testing streaming with system prompt...');
|
|
67
|
+
console.log('System: "You are a pirate. Always respond like a pirate with \'Arrr\' and pirate language."');
|
|
68
|
+
console.log('Question: "Count from 1 to 3 briefly."\n');
|
|
69
|
+
console.log('Streaming response:');
|
|
70
|
+
console.log('---');
|
|
71
|
+
|
|
72
|
+
const systemStreamResponse = googleModel.chatStream([
|
|
73
|
+
{ role: 'system', content: 'You are a pirate. Always respond like a pirate with "Arrr" and pirate language.' },
|
|
74
|
+
{ role: 'user', content: 'Count from 1 to 3 briefly.' }
|
|
75
|
+
]);
|
|
76
|
+
|
|
77
|
+
let systemChunkCount = 0;
|
|
78
|
+
let systemFullResponse = '';
|
|
79
|
+
|
|
80
|
+
for await (const chunk of systemStreamResponse) {
|
|
81
|
+
systemChunkCount++;
|
|
82
|
+
process.stdout.write(chunk);
|
|
83
|
+
systemFullResponse += chunk;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
console.log('\n---');
|
|
87
|
+
console.log(`โ
System prompt streaming completed! Received ${systemChunkCount} chunks`);
|
|
88
|
+
console.log(`Full response length: ${systemFullResponse.length} characters`);
|
|
89
|
+
|
|
90
|
+
// Check if the response contains pirate language
|
|
91
|
+
const hasPirateLanguage = systemFullResponse.toLowerCase().includes('arr') ||
|
|
92
|
+
systemFullResponse.toLowerCase().includes('matey') ||
|
|
93
|
+
systemFullResponse.toLowerCase().includes('pirate') ||
|
|
94
|
+
systemFullResponse.toLowerCase().includes('ahoy');
|
|
95
|
+
|
|
96
|
+
if (hasPirateLanguage) {
|
|
97
|
+
console.log('โ
System prompt appears to be working - pirate language detected!');
|
|
98
|
+
} else {
|
|
99
|
+
console.log('โ ๏ธ System prompt might not be working - no obvious pirate language detected');
|
|
100
|
+
console.log('Response content:', systemFullResponse);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
} catch (error) {
|
|
104
|
+
console.error(`โ System prompt streaming test failed for ${modelName}:`, error);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Test 3: Non-streaming chat with system prompt
|
|
109
|
+
console.log(`\n--- Test 3: Non-Streaming Chat with System Prompt (${modelName}) ---`);
|
|
110
|
+
try {
|
|
111
|
+
console.log('๐ญ Testing non-streaming chat with system prompt...');
|
|
112
|
+
console.log('System: "You are a helpful mathematician. Always explain your counting clearly."');
|
|
113
|
+
console.log('Question: "Count from 1 to 3."\n');
|
|
114
|
+
|
|
115
|
+
const chatResponse = await googleModel.chat([
|
|
116
|
+
{ role: 'system', content: 'You are a helpful mathematician. Always explain your counting clearly.' },
|
|
117
|
+
{ role: 'user', content: 'Count from 1 to 3.' }
|
|
118
|
+
]);
|
|
119
|
+
|
|
120
|
+
console.log('Non-streaming response:');
|
|
121
|
+
console.log('---');
|
|
122
|
+
console.log(chatResponse.message.content);
|
|
123
|
+
console.log('---');
|
|
124
|
+
console.log(`โ
Non-streaming chat completed!`);
|
|
125
|
+
console.log(`Response length: ${chatResponse.message.content.length} characters`);
|
|
126
|
+
|
|
127
|
+
} catch (error) {
|
|
128
|
+
console.error(`โ Non-streaming chat test failed for ${modelName}:`, error);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
} else {
|
|
132
|
+
console.log(`โ ๏ธ Skipping system prompt tests for ${modelName} - model doesn't support system instructions`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Run the enhanced test
|
|
137
|
+
testGoogleStreamingEnhanced().then(result => {
|
|
138
|
+
if (result.success) {
|
|
139
|
+
console.log('\n๐ All tests completed successfully!');
|
|
140
|
+
console.log('\n๐ Summary:');
|
|
141
|
+
console.log('โ
Basic streaming: Working');
|
|
142
|
+
console.log('๐ System prompt streaming: Tested (check output above)');
|
|
143
|
+
console.log('โ
Non-streaming chat: Working');
|
|
144
|
+
} else {
|
|
145
|
+
console.log('\n๐ฅ Tests failed');
|
|
146
|
+
}
|
|
147
|
+
});
|