feat: custom bot for poe.com (#189)

This commit is contained in:
josc146
2023-04-21 16:38:18 +08:00
parent b11e5ce6b7
commit 4cc2b91bdd
3 changed files with 37 additions and 7 deletions
+8
View File
@@ -26,6 +26,7 @@ export const Models = {
customModel: { value: '', desc: 'Custom Model' },
azureOpenAi: { value: '', desc: 'ChatGPT (Azure)' },
waylaidwandererApi: { value: '', desc: 'Waylaidwanderer API (Github)' },
poeAiWebCustom: { value: '', desc: 'Poe AI (Web, Custom)' },
poeAiWebChatGpt: { value: 'chatgpt', desc: 'Poe AI (Web, ChatGPT)' },
poeAiWebDragonfly: { value: 'dragonfly', desc: 'Poe AI (Web, Dragonfly)' },
}
@@ -42,6 +43,7 @@ export const poeWebModelKeys = [
'poeAiWebGPT4',
'poeAiWebClaudePlus',
'poeAiWebClaude',
'poeAiWebCustom',
'poeAiWebChatGpt',
'poeAiWebDragonfly',
]
@@ -90,6 +92,8 @@ export const defaultConfig = {
azureEndpoint: '',
azureDeploymentName: '',
poeCustomBotName: '',
/** @type {keyof ModelMode}*/
modelMode: 'balanced',
@@ -182,6 +186,10 @@ export function isUsingCustomModel(configOrSession) {
return customApiModelKeys.includes(configOrSession.modelName)
}
export function isUsingCustomNameOnlyModel(configOrSession) {
return configOrSession.modelName === 'poeAiWebCustom'
}
export function isUsingAzureOpenAi(configOrSession) {
return azureOpenAiApiModelKeys.includes(configOrSession.modelName)
}