apexify.js 4.5.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ApexAI.d.ts +13 -13
- package/dist/ai/ApexAI.js +1 -1
- package/dist/ai/ApexModules.d.ts.map +1 -1
- package/dist/ai/ApexModules.js +7 -4
- package/dist/ai/ApexModules.js.map +1 -1
- package/dist/ai/functions/draw.d.ts.map +1 -1
- package/dist/ai/functions/draw.js +541 -672
- package/dist/ai/functions/draw.js.map +1 -1
- package/dist/ai/functions/validOptions.d.ts +3 -3
- package/dist/ai/functions/validOptions.d.ts.map +1 -1
- package/dist/ai/functions/validOptions.js +12 -12
- package/dist/ai/functions/validOptions.js.map +1 -1
- package/dist/ai/modals-chat/rsn/rsnChat.d.ts.map +1 -1
- package/dist/ai/modals-chat/rsn/rsnChat.js +7 -0
- package/dist/ai/modals-chat/rsn/rsnChat.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/lib/ai/ApexModules.ts +4 -2
- package/lib/ai/functions/draw.ts +558 -729
- package/lib/ai/functions/validOptions.ts +2 -2
- package/lib/ai/modals-chat/rsn/rsnChat.ts +11 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ sdk.auth('43435e1c-cab1-493f-a224-f51e4b97ce8d');
|
|
|
5
5
|
|
|
6
6
|
export const hercChatModels = ["v3" , "v3-32k" , "turbo" , "turbo-16k" , "gemini" , "llama3-70b" , "llama3-8b" , "mixtral-8x7b" , "gemma-7b" , "gemma2-9b"];
|
|
7
7
|
export const groqChatModels = ['gemma-7b-it', 'gemma2-9b-it', 'llama3-groq-70b-8192-tool-use-preview', 'llama3-groq-8b-8192-tool-use-preview', 'llama-3.1-70b-versatile', 'llama-3.1-8b-instant', 'llama-guard-3-8b', 'llama3-70b-8192', 'llama3-8b-8192', 'mixtral-8x7b-32768'];
|
|
8
|
-
export const rsnChatModels = ['bard', 'bing', 'codellama', 'gemini', 'llama', 'mixtral', 'openchat', 'gpt4'];
|
|
8
|
+
export const rsnChatModels = ['bard', 'bing', 'codellama', 'gemini', 'llama', 'mixtral', 'openchat', 'gpt4', 'dalle'];
|
|
9
9
|
export const otherChatModel = ['apexai', 'facebook_ai', 'yi_34b', 'starChat'];
|
|
10
10
|
export const fresedgptModels = ['real-cartoon-xl-v6', 'flux-schnell', 'gpt-4o'];
|
|
11
11
|
|
|
@@ -24,7 +24,7 @@ export const fresedgptModels = ['real-cartoon-xl-v6', 'flux-schnell', 'gpt-4o'];
|
|
|
24
24
|
"simurg",
|
|
25
25
|
"animefy",
|
|
26
26
|
"raava",
|
|
27
|
-
"shonin"
|
|
27
|
+
"shonin",
|
|
28
28
|
];
|
|
29
29
|
|
|
30
30
|
|
|
@@ -15,6 +15,7 @@ const validApiNames = [
|
|
|
15
15
|
'mixtral',
|
|
16
16
|
'openchat',
|
|
17
17
|
'gpt4',
|
|
18
|
+
'dalle'
|
|
18
19
|
];
|
|
19
20
|
|
|
20
21
|
export async function rsnAPI({ API_KEY, prompt, apiName }: aiOptions): Promise<string> {
|
|
@@ -32,6 +33,8 @@ export async function rsnAPI({ API_KEY, prompt, apiName }: aiOptions): Promise<s
|
|
|
32
33
|
headers: { Authorization: `Bearer ${apiKey}` },
|
|
33
34
|
});
|
|
34
35
|
|
|
36
|
+
if (apiName === 'dalle') return response.data?.image.url;
|
|
37
|
+
|
|
35
38
|
return response.data.message;
|
|
36
39
|
} catch (e: any) {
|
|
37
40
|
if (e.response && e.response.data.message === 'Invalid API key.') {
|
|
@@ -39,6 +42,9 @@ export async function rsnAPI({ API_KEY, prompt, apiName }: aiOptions): Promise<s
|
|
|
39
42
|
const defaultResponse = await axios.post(apiUrl, { prompt }, {
|
|
40
43
|
headers: { Authorization: `Bearer rsnai_SbLbFcwdT2h2KoYet2LS0F34` },
|
|
41
44
|
});
|
|
45
|
+
|
|
46
|
+
if (apiName === 'dalle') return defaultResponse.data?.image.url;
|
|
47
|
+
|
|
42
48
|
return defaultResponse.data.message;
|
|
43
49
|
} catch (err) {
|
|
44
50
|
console.log(err);
|
|
@@ -50,6 +56,9 @@ export async function rsnAPI({ API_KEY, prompt, apiName }: aiOptions): Promise<s
|
|
|
50
56
|
const backupResponse = await axios.post(apiUrl, { prompt }, {
|
|
51
57
|
headers: { Authorization: `Bearer rsnai_lvIch9Z7apBHqfXYqOiXwzm7` },
|
|
52
58
|
});
|
|
59
|
+
|
|
60
|
+
if (apiName === 'dalle') return backupResponse.data?.image.url;
|
|
61
|
+
|
|
53
62
|
return backupResponse.data.message;
|
|
54
63
|
} catch (err) {
|
|
55
64
|
console.log(err);
|
|
@@ -61,3 +70,5 @@ export async function rsnAPI({ API_KEY, prompt, apiName }: aiOptions): Promise<s
|
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
72
|
}
|
|
73
|
+
|
|
74
|
+
|