swiftbase-sdk 1.0.2 → 1.0.4
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/index.cjs +21 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3594,6 +3594,7 @@ var index_exports = {};
|
|
|
3594
3594
|
__export(index_exports, {
|
|
3595
3595
|
PaginatedResponse: () => PaginatedResponse,
|
|
3596
3596
|
Storage: () => Storage,
|
|
3597
|
+
ai: () => ai,
|
|
3597
3598
|
assignRole: () => assignRole,
|
|
3598
3599
|
changePassword: () => changePassword,
|
|
3599
3600
|
createRole: () => createRole,
|
|
@@ -3729,7 +3730,7 @@ var initializeSdk = (projectId, options) => {
|
|
|
3729
3730
|
}
|
|
3730
3731
|
if (typeof window !== "undefined") {
|
|
3731
3732
|
app.userManager = new import_oidc_client_ts.UserManager({
|
|
3732
|
-
authority: app.baseUrl
|
|
3733
|
+
authority: app.baseUrl,
|
|
3733
3734
|
client_id: app.projectId,
|
|
3734
3735
|
redirect_uri: window.location.origin,
|
|
3735
3736
|
post_logout_redirect_uri: window.location.origin,
|
|
@@ -4766,10 +4767,29 @@ var Storage = class {
|
|
|
4766
4767
|
});
|
|
4767
4768
|
}
|
|
4768
4769
|
};
|
|
4770
|
+
|
|
4771
|
+
// src/ai.ts
|
|
4772
|
+
var ai = {
|
|
4773
|
+
chat: {
|
|
4774
|
+
completions: {
|
|
4775
|
+
create: (options) => __async(null, null, function* () {
|
|
4776
|
+
return yield makeRequest("post" /* POST */, "/api/ai/chat/completions", void 0, {
|
|
4777
|
+
model: options.model || "gemini-3.5-flash-lite",
|
|
4778
|
+
messages: options.messages,
|
|
4779
|
+
tools: options.tools,
|
|
4780
|
+
tool_choice: options.tool_choice,
|
|
4781
|
+
temperature: options.temperature,
|
|
4782
|
+
max_tokens: options.max_tokens
|
|
4783
|
+
});
|
|
4784
|
+
})
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
};
|
|
4769
4788
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4770
4789
|
0 && (module.exports = {
|
|
4771
4790
|
PaginatedResponse,
|
|
4772
4791
|
Storage,
|
|
4792
|
+
ai,
|
|
4773
4793
|
assignRole,
|
|
4774
4794
|
changePassword,
|
|
4775
4795
|
createRole,
|