@startinblox/ai-bridge 1.0.0 → 1.0.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/README.md +2 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/src/components/solid-ai-bridge.ts +3 -2
package/README.md
CHANGED
|
@@ -43,9 +43,9 @@ To perform an AI query, you can either use the `window.sibAIBridge.aiQuery` func
|
|
|
43
43
|
|
|
44
44
|
```typescript
|
|
45
45
|
const result = await window.sibAIBridge.aiQuery(
|
|
46
|
-
"your
|
|
46
|
+
"3dobject-search", // or your custom model name
|
|
47
47
|
[/* array of Resource objects */],
|
|
48
|
-
"
|
|
48
|
+
"your prompt here", // optional
|
|
49
49
|
);
|
|
50
50
|
console.log(result.datas); // Filtered resources
|
|
51
51
|
```
|
package/dist/index.js
CHANGED
|
@@ -50572,8 +50572,9 @@ let yl = class extends QR {
|
|
|
50572
50572
|
async init() {
|
|
50573
50573
|
window.sibAIBridge || (window.sibAIBridge = {
|
|
50574
50574
|
aiQuery: async (A, I, C) => ({
|
|
50575
|
-
|
|
50576
|
-
|
|
50575
|
+
model: A,
|
|
50576
|
+
prompt: C,
|
|
50577
|
+
datas: await this.applyModel(A, C || "", I)
|
|
50577
50578
|
})
|
|
50578
50579
|
}), this.initializer?.(!0);
|
|
50579
50580
|
}
|
package/package.json
CHANGED
|
@@ -55,10 +55,11 @@ export class SolidAIBridge extends LitElement {
|
|
|
55
55
|
|
|
56
56
|
if (!window.sibAIBridge) {
|
|
57
57
|
window.sibAIBridge = {
|
|
58
|
-
aiQuery: async (
|
|
58
|
+
aiQuery: async (model: string, datas: Resource[], prompt?: string) => {
|
|
59
59
|
return {
|
|
60
|
+
model,
|
|
60
61
|
prompt,
|
|
61
|
-
datas: await this.applyModel(model, prompt, datas),
|
|
62
|
+
datas: await this.applyModel(model, prompt || "", datas),
|
|
62
63
|
};
|
|
63
64
|
},
|
|
64
65
|
};
|