Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Commit 4f1fceb

Browse files
authored
Update index.html
1 parent 2b14245 commit 4f1fceb

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

index.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@
117117
banDuration: 15 // seconds
118118
};
119119

120-
// API configuration for OnlySq API 2.0 with Searchgpt model
120+
// Updated API configuration for OnlySq API 2.0 with Searchgpt model
121121
const API_CONFIG = {
122-
baseUrl: "https://api.onlysq.ru/ai/openai",
123-
apiKey: "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",
124-
model: "Searchgpt",
122+
baseUrl: "https://api.onlysq.ru/ai/v2",
123+
apiKey: "YOUR_API_KEY", // Replace with your actual API key
124+
model: "searchgpt",
125125
timeout: 10000, // 10 seconds
126126
retries: 2
127127
};
@@ -398,19 +398,21 @@
398398
fast=answer`;
399399
}
400400

401-
// API request data structure for OnlySq API 2.0
401+
// Updated API request data structure for OnlySq API 2.0
402402
const requestData = {
403403
model: API_CONFIG.model,
404-
messages: [{
405-
role: "user",
406-
content: prompt
407-
}]
404+
request: {
405+
messages: [{
406+
role: "user",
407+
content: prompt
408+
}]
409+
}
408410
};
409411

410412
// Make API request to OnlySq API 2.0
411413
let response;
412414
try {
413-
response = await fetch(API_CONFIG.baseUrl + "/v1/chat/completions", {
415+
response = await fetch(API_CONFIG.baseUrl, {
414416
method: 'POST',
415417
headers: {
416418
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)