@bytexbyte/nxtlinq-ai-agent-sdk 1.6.27 → 1.6.29
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/api/nxtlinq-api.d.ts.map +1 -1
- package/dist/api/nxtlinq-api.js +7 -2
- package/dist/assets/images/adiSideItalicDataUri.d.ts +2 -0
- package/dist/assets/images/adiSideItalicDataUri.d.ts.map +1 -0
- package/dist/assets/images/adiSideItalicDataUri.js +1 -0
- package/dist/components/context/ChatBotContext.d.ts.map +1 -1
- package/dist/components/context/ChatBotContext.js +34 -5
- package/dist/components/ui/ModelSelector.d.ts.map +1 -1
- package/dist/components/ui/ModelSelector.js +29 -30
- package/dist/types/ait-api.d.ts +2 -0
- package/dist/types/ait-api.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/nxtlinq-ai-agent.umd.js +140 -125
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nxtlinq-api.d.ts","sourceRoot":"","sources":["../../src/api/nxtlinq-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM1C,eAAO,MAAM,WAAW,GAAI,aAAa,YAAY,GAAG,SAAS,SAQhE,CAAC;
|
|
1
|
+
{"version":3,"file":"nxtlinq-api.d.ts","sourceRoot":"","sources":["../../src/api/nxtlinq-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAM1C,eAAO,MAAM,WAAW,GAAI,aAAa,YAAY,GAAG,SAAS,SAQhE,CAAC;AAiZF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,WAAW,MAAM,KAAG,MAUpE,CAAC"}
|
package/dist/api/nxtlinq-api.js
CHANGED
|
@@ -32,7 +32,11 @@ const makeRequest = async (url, options, apiKey, apiSecret) => {
|
|
|
32
32
|
// AIT API module
|
|
33
33
|
const createAITApi = (apiKey, apiSecret) => ({
|
|
34
34
|
getAITByServiceIdAndController: async (params, token) => {
|
|
35
|
-
|
|
35
|
+
const url = new URL(`${AIT_SERVICE_API_HOST}/api/ait/service/${params.serviceId}/controller/${params.controller}`);
|
|
36
|
+
if (params.customUsername) {
|
|
37
|
+
url.searchParams.append('customUsername', params.customUsername);
|
|
38
|
+
}
|
|
39
|
+
return makeRequest(url.toString(), { method: 'GET' }, apiKey, apiSecret);
|
|
36
40
|
},
|
|
37
41
|
createAIT: async (params, token) => {
|
|
38
42
|
return makeRequest(`${AIT_SERVICE_API_HOST}/api/ait`, {
|
|
@@ -82,7 +86,7 @@ const createAuthApi = (apiKey, apiSecret) => ({
|
|
|
82
86
|
const createAgentApi = () => ({
|
|
83
87
|
sendMessage: async (params) => {
|
|
84
88
|
try {
|
|
85
|
-
const model = params.model || '
|
|
89
|
+
const model = params.model || 'open-ai';
|
|
86
90
|
// Get AIT related information
|
|
87
91
|
const walletAddress = localStorage.getItem('walletAddress');
|
|
88
92
|
const aitTokenRaw = localStorage.getItem('nxtlinqAITServiceAccessToken');
|
|
@@ -100,6 +104,7 @@ const createAgentApi = () => ({
|
|
|
100
104
|
pseudoId: params.pseudoId,
|
|
101
105
|
externalId: params.externalId,
|
|
102
106
|
customUserInfo: params.customUserInfo,
|
|
107
|
+
customUsername: params.customUsername,
|
|
103
108
|
message: params.message,
|
|
104
109
|
walletAddress: walletAddress || undefined,
|
|
105
110
|
aitToken: aitToken || undefined,
|