Update main.ts
Browse files
main.ts
CHANGED
|
@@ -88,30 +88,27 @@ class GoogleAIService {
|
|
| 88 |
"object": "model",
|
| 89 |
"created": now,
|
| 90 |
"owned_by": "google",
|
| 91 |
-
"
|
| 92 |
-
"
|
| 93 |
-
|
| 94 |
-
},)
|
| 95 |
this.cachedModels.push({
|
| 96 |
"id": "gemini-2.5-flash-search",
|
| 97 |
"name": "gemini-2.5-flash-search",
|
| 98 |
"object": "model",
|
| 99 |
"created": now,
|
| 100 |
"owned_by": "google",
|
| 101 |
-
"
|
| 102 |
-
"
|
| 103 |
-
|
| 104 |
-
},)
|
| 105 |
this.cachedModels.push({
|
| 106 |
"id": "gemini-2.5-pro-search",
|
| 107 |
"name": "gemini-2.5-pro-search",
|
| 108 |
"object": "model",
|
| 109 |
"created": now,
|
| 110 |
"owned_by": "google",
|
| 111 |
-
"
|
| 112 |
-
"
|
| 113 |
-
|
| 114 |
-
},)
|
| 115 |
console.log(`Fetched ${this.cachedModels.length} models from Google AI`);
|
| 116 |
return this.cachedModels;
|
| 117 |
}
|
|
@@ -602,7 +599,7 @@ class OpenAICompatibleServer {
|
|
| 602 |
const body: OpenAIRequest = await request.json();
|
| 603 |
const requestedModel = body.model || "gemini-1.5-pro";
|
| 604 |
const stream = body.stream || false;
|
| 605 |
-
const maxTokens = body.max_tokens ||
|
| 606 |
console.log(`Request for model: ${requestedModel}, stream: ${stream}, max_tokens: ${maxTokens}`);
|
| 607 |
|
| 608 |
const lastMessage = body.messages[body.messages.length - 1];
|
|
|
|
| 88 |
"object": "model",
|
| 89 |
"created": now,
|
| 90 |
"owned_by": "google",
|
| 91 |
+
"description": "Gemini 2.0 Flash with GoogleSearch",
|
| 92 |
+
"maxTokens": 1048576
|
| 93 |
+
})
|
|
|
|
| 94 |
this.cachedModels.push({
|
| 95 |
"id": "gemini-2.5-flash-search",
|
| 96 |
"name": "gemini-2.5-flash-search",
|
| 97 |
"object": "model",
|
| 98 |
"created": now,
|
| 99 |
"owned_by": "google",
|
| 100 |
+
"description": "Gemini 2.5 Flash with GoogleSearch",
|
| 101 |
+
"maxTokens": 1048576
|
| 102 |
+
})
|
|
|
|
| 103 |
this.cachedModels.push({
|
| 104 |
"id": "gemini-2.5-pro-search",
|
| 105 |
"name": "gemini-2.5-pro-search",
|
| 106 |
"object": "model",
|
| 107 |
"created": now,
|
| 108 |
"owned_by": "google",
|
| 109 |
+
"description": "Gemini 2.5 Pro with GoogleSearch",
|
| 110 |
+
"maxTokens": 1048576
|
| 111 |
+
})
|
|
|
|
| 112 |
console.log(`Fetched ${this.cachedModels.length} models from Google AI`);
|
| 113 |
return this.cachedModels;
|
| 114 |
}
|
|
|
|
| 599 |
const body: OpenAIRequest = await request.json();
|
| 600 |
const requestedModel = body.model || "gemini-1.5-pro";
|
| 601 |
const stream = body.stream || false;
|
| 602 |
+
const maxTokens = body.max_tokens || 1048576;
|
| 603 |
console.log(`Request for model: ${requestedModel}, stream: ${stream}, max_tokens: ${maxTokens}`);
|
| 604 |
|
| 605 |
const lastMessage = body.messages[body.messages.length - 1];
|