Spaces:
Running
Running
Update aiEngine.js
Browse files- aiEngine.js +12 -4
aiEngine.js
CHANGED
|
@@ -17,11 +17,15 @@ export const AIEngine = {
|
|
| 17 |
const modelId = 'gemini-3-pro-preview'; // Per prompt requirements
|
| 18 |
const config = {
|
| 19 |
thinkingConfig: { thinkingLevel: 'HIGH' },
|
| 20 |
-
tools: [{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
};
|
| 22 |
|
| 23 |
const contents = [
|
| 24 |
-
|
| 25 |
...history,
|
| 26 |
{ role: 'user', parts: [{ text: input }] }
|
| 27 |
];
|
|
@@ -46,7 +50,11 @@ export const AIEngine = {
|
|
| 46 |
const modelId = 'gemini-flash-latest'; // Per prompt requirements
|
| 47 |
const config = {
|
| 48 |
thinkingConfig: { thinkingBudget: -1 }, // Standard generation
|
| 49 |
-
tools: [{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
};
|
| 51 |
|
| 52 |
const currentParts = [{ text: input }];
|
|
@@ -55,7 +63,7 @@ export const AIEngine = {
|
|
| 55 |
}
|
| 56 |
|
| 57 |
const contents = [
|
| 58 |
-
|
| 59 |
...history,
|
| 60 |
{ role: 'user', parts: currentParts }
|
| 61 |
];
|
|
|
|
| 17 |
const modelId = 'gemini-3-pro-preview'; // Per prompt requirements
|
| 18 |
const config = {
|
| 19 |
thinkingConfig: { thinkingLevel: 'HIGH' },
|
| 20 |
+
tools: [{
|
| 21 |
+
systemInstruction: [{
|
| 22 |
+
text: prompts.pm_system_prompt
|
| 23 |
+
}],
|
| 24 |
+
googleSearch: {} }],
|
| 25 |
};
|
| 26 |
|
| 27 |
const contents = [
|
| 28 |
+
// { role: 'user', parts: [{ text: prompts.pm_system_prompt }] }, // System instruction injection
|
| 29 |
...history,
|
| 30 |
{ role: 'user', parts: [{ text: input }] }
|
| 31 |
];
|
|
|
|
| 50 |
const modelId = 'gemini-flash-latest'; // Per prompt requirements
|
| 51 |
const config = {
|
| 52 |
thinkingConfig: { thinkingBudget: -1 }, // Standard generation
|
| 53 |
+
tools: [{
|
| 54 |
+
systemInstruction: [{
|
| 55 |
+
text: prompts.worker_system_prompt
|
| 56 |
+
}],
|
| 57 |
+
googleSearch: {} }],
|
| 58 |
};
|
| 59 |
|
| 60 |
const currentParts = [{ text: input }];
|
|
|
|
| 63 |
}
|
| 64 |
|
| 65 |
const contents = [
|
| 66 |
+
// { role: 'user', parts: [{ text: prompts.worker_system_prompt }] },
|
| 67 |
...history,
|
| 68 |
{ role: 'user', parts: currentParts }
|
| 69 |
];
|