mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-10 22:20:25 +00:00
feat(chat): add AQBot preset (#7079)
This commit is contained in:
@@ -89,7 +89,8 @@ export function chatLinkRequiresApiKey(url: string): boolean {
|
||||
url.includes('{key}') ||
|
||||
url.includes('{cherryConfig}') ||
|
||||
url.includes('{aionuiConfig}') ||
|
||||
url.includes('{deepchatConfig}')
|
||||
url.includes('{deepchatConfig}') ||
|
||||
url.includes('{aqbotConfig}')
|
||||
)
|
||||
}
|
||||
|
||||
@@ -189,6 +190,16 @@ export function resolveChatUrl({
|
||||
return replaceToken(url, '{deepchatConfig}', encoded)
|
||||
}
|
||||
|
||||
if (url.includes('{aqbotConfig}')) {
|
||||
const query = [
|
||||
`name=${encodeURIComponent('New API')}`,
|
||||
`baseurl=${encodeURIComponent(safeServerAddress)}`,
|
||||
`apikey=${encodeURIComponent(safeApiKey)}`,
|
||||
'type=openai',
|
||||
].join('&')
|
||||
return replaceToken(url, '{aqbotConfig}', query)
|
||||
}
|
||||
|
||||
if (safeServerAddress) {
|
||||
const encodedAddress = encodeURIComponent(safeServerAddress)
|
||||
url = replaceToken(url, '{address}', encodedAddress)
|
||||
|
||||
Reference in New Issue
Block a user