@innovastudio/contentbox 1.6.102 → 1.6.103
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/index.d.ts +1 -0
- package/package.json +2 -2
- package/public/contentbox/contentbox.esm.js +21 -5
- package/public/contentbox/contentbox.min.js +2 -2
- package/readme.txt +26 -6
package/readme.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
ContentBox.js 5.8.
|
1
|
+
ContentBox.js 5.8.28
|
2
2
|
|
3
3
|
Documentation:
|
4
4
|
|
@@ -62,20 +62,39 @@ C. To try the JavaScript project, install the dependencies and start the project
|
|
62
62
|
NOTE:
|
63
63
|
|
64
64
|
- To use the AI Assistant:
|
65
|
-
|
65
|
+
|
66
|
+
1. Obtain the API key from OpenAI or OpenRouter
|
67
|
+
|
68
|
+
https://openai.com
|
69
|
+
|
70
|
+
or
|
71
|
+
|
72
|
+
https://openrouter.ai
|
73
|
+
|
74
|
+
Use OpenRouter if you want to use various models.
|
75
|
+
|
66
76
|
2. Update the .env file with your API key.
|
67
77
|
|
68
|
-
|
78
|
+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
79
|
+
|
80
|
+
or
|
81
|
+
|
82
|
+
OPENROUTER_API_KEY=YOUR_API_KEY
|
83
|
+
|
84
|
+
Or if you're using PHP, update the api/config.php file with your API key:
|
69
85
|
|
70
|
-
|
86
|
+
$OPENAI_API_KEY = 'YOUR_API_KEY';
|
71
87
|
|
72
|
-
|
88
|
+
or
|
73
89
|
|
74
|
-
|
90
|
+
$OPENROUTER_API_KEY = 'YOUR_API_KEY';
|
91
|
+
|
92
|
+
3. Ensure that the sendCommandUrl parameter is set with the API endpoint:
|
75
93
|
|
76
94
|
const builder = new ContentBuilder({
|
77
95
|
// ...
|
78
96
|
sendCommandUrl: '/sendcommand',
|
97
|
+
// sendCommandUrl: '/openrouter', // Using OpenRouter (https://openrouter.ai/)
|
79
98
|
});
|
80
99
|
|
81
100
|
If you're using PHP:
|
@@ -83,6 +102,7 @@ NOTE:
|
|
83
102
|
const builder = new ContentBuilder({
|
84
103
|
// ...
|
85
104
|
sendCommandUrl: 'api/sendcommand.php',
|
105
|
+
// sendCommandUrl: '/api/openrouter.php', // Using OpenRouter (https://openrouter.ai/)
|
86
106
|
});
|
87
107
|
|
88
108
|
Most examples in the package have this parameter configured, so you can run and test them.
|