Fix non-existent Gemini 3 models to Gemini 2.5
Browse files
services/geminiService.ts
CHANGED
|
@@ -104,7 +104,7 @@ const isQuotaError = (error: any): boolean => {
|
|
| 104 |
export const boostPrompt = async (prompt: string): Promise<string> => {
|
| 105 |
try {
|
| 106 |
const response = await getAI().models.generateContent({
|
| 107 |
-
model: 'gemini-
|
| 108 |
contents: `Rewrite and enrich the following text to be a perfect command (prompt) or a great project idea to be given to an AI assistant.
|
| 109 |
- If it's a short and simple idea, detail it and add depth.
|
| 110 |
- If it's complex and messy, structure and clarify it.
|
|
@@ -155,7 +155,7 @@ export const createProjectPlan = async (userPrompt: string, memories: StyleMemor
|
|
| 155 |
: "";
|
| 156 |
|
| 157 |
const response = await getAI().models.generateContent({
|
| 158 |
-
model: 'gemini-
|
| 159 |
contents: userPrompt + memoryContext,
|
| 160 |
config: {
|
| 161 |
systemInstruction: PLANNER_SYSTEM_INSTRUCTION,
|
|
@@ -246,7 +246,7 @@ Use Markdown format.
|
|
| 246 |
return "--- Image could not be generated ---\n" + stepDescription;
|
| 247 |
} else if (stepType === NoteType.TEXT) {
|
| 248 |
const textPromise = getAI().models.generateContent({
|
| 249 |
-
model: 'gemini-
|
| 250 |
contents: contextPrompt,
|
| 251 |
}).catch(e => {
|
| 252 |
console.error("Text content generation error:", e);
|
|
@@ -296,7 +296,7 @@ Use Markdown format.
|
|
| 296 |
// Code generation
|
| 297 |
try {
|
| 298 |
const response = await getAI().models.generateContent({
|
| 299 |
-
model: 'gemini-
|
| 300 |
contents: contextPrompt,
|
| 301 |
});
|
| 302 |
return response.text || "Content could not be generated.";
|
|
@@ -333,7 +333,7 @@ export const chatWithStep = async (
|
|
| 333 |
];
|
| 334 |
|
| 335 |
const response = await getAI().models.generateContent({
|
| 336 |
-
model: 'gemini-
|
| 337 |
contents: contents,
|
| 338 |
config: {
|
| 339 |
systemInstruction: `You are an expert in the "MindSpark" project.
|
|
|
|
| 104 |
export const boostPrompt = async (prompt: string): Promise<string> => {
|
| 105 |
try {
|
| 106 |
const response = await getAI().models.generateContent({
|
| 107 |
+
model: 'gemini-2.5-flash',
|
| 108 |
contents: `Rewrite and enrich the following text to be a perfect command (prompt) or a great project idea to be given to an AI assistant.
|
| 109 |
- If it's a short and simple idea, detail it and add depth.
|
| 110 |
- If it's complex and messy, structure and clarify it.
|
|
|
|
| 155 |
: "";
|
| 156 |
|
| 157 |
const response = await getAI().models.generateContent({
|
| 158 |
+
model: 'gemini-2.5-pro',
|
| 159 |
contents: userPrompt + memoryContext,
|
| 160 |
config: {
|
| 161 |
systemInstruction: PLANNER_SYSTEM_INSTRUCTION,
|
|
|
|
| 246 |
return "--- Image could not be generated ---\n" + stepDescription;
|
| 247 |
} else if (stepType === NoteType.TEXT) {
|
| 248 |
const textPromise = getAI().models.generateContent({
|
| 249 |
+
model: 'gemini-2.5-flash',
|
| 250 |
contents: contextPrompt,
|
| 251 |
}).catch(e => {
|
| 252 |
console.error("Text content generation error:", e);
|
|
|
|
| 296 |
// Code generation
|
| 297 |
try {
|
| 298 |
const response = await getAI().models.generateContent({
|
| 299 |
+
model: 'gemini-2.5-flash',
|
| 300 |
contents: contextPrompt,
|
| 301 |
});
|
| 302 |
return response.text || "Content could not be generated.";
|
|
|
|
| 333 |
];
|
| 334 |
|
| 335 |
const response = await getAI().models.generateContent({
|
| 336 |
+
model: 'gemini-2.5-flash',
|
| 337 |
contents: contents,
|
| 338 |
config: {
|
| 339 |
systemInstruction: `You are an expert in the "MindSpark" project.
|