oricore 1.4.0 → 1.5.0
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 +13 -2
- package/README.zh-CN.md +13 -2
- package/dist/{chunk-COJ5APNY.js → chunk-4QYFQSAC.js} +287 -101
- package/dist/chunk-4QYFQSAC.js.map +1 -0
- package/dist/{chunk-SXDGT4YB.js → chunk-DO76AL42.js} +1813 -457
- package/dist/chunk-DO76AL42.js.map +1 -0
- package/dist/{chunk-WDEZLYBN.js → chunk-OYWDQD3F.js} +2 -2
- package/dist/history-AGNMX5YW.js +8 -0
- package/dist/index.cjs +2045 -498
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/{session-ISSOYGYB.js → session-QMS6OYG2.js} +4 -4
- package/dist/undici-326ZBRKH.js +5 -0
- package/package.json +1 -1
- package/src/core/loop.ts +79 -25
- package/src/core/model/models.ts +95 -0
- package/src/core/model/providers.ts +85 -37
- package/src/core/model/resolution.ts +13 -0
- package/src/mcp/mcp.ts +4 -1
- package/src/skill/skill.ts +18 -3
- package/src/utils/messageNormalization.ts +18 -0
- package/dist/chunk-COJ5APNY.js.map +0 -1
- package/dist/chunk-SXDGT4YB.js.map +0 -1
- package/dist/history-Y45PBGO5.js +0 -8
- package/dist/undici-DJO5UB2C.js +0 -5
- /package/dist/{chunk-WDEZLYBN.js.map → chunk-OYWDQD3F.js.map} +0 -0
- /package/dist/{history-Y45PBGO5.js.map → history-AGNMX5YW.js.map} +0 -0
- /package/dist/{session-ISSOYGYB.js.map → session-QMS6OYG2.js.map} +0 -0
- /package/dist/{undici-DJO5UB2C.js.map → undici-326ZBRKH.js.map} +0 -0
package/README.md
CHANGED
|
@@ -29,7 +29,14 @@ Build AI-powered products with just **5 lines of code**:
|
|
|
29
29
|
import { createEngine } from 'oricore';
|
|
30
30
|
|
|
31
31
|
const engine = createEngine({ productName: 'MyApp', version: '1.0.0' });
|
|
32
|
-
await engine.initialize({
|
|
32
|
+
await engine.initialize({
|
|
33
|
+
model: 'deepseek/deepseek-chat',
|
|
34
|
+
provider: {
|
|
35
|
+
deepseek: {
|
|
36
|
+
options: { apiKey: 'your-key' }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
33
40
|
|
|
34
41
|
const result = await engine.sendMessage({ message: 'Analyze this project structure', write: true });
|
|
35
42
|
console.log(result.data.text);
|
|
@@ -49,7 +56,11 @@ import { createEngine } from 'oricore';
|
|
|
49
56
|
const engine = createEngine({ productName: 'MyAIAssistant', version: '1.0.0' });
|
|
50
57
|
await engine.initialize({
|
|
51
58
|
model: 'deepseek/deepseek-chat',
|
|
52
|
-
provider: {
|
|
59
|
+
provider: {
|
|
60
|
+
deepseek: {
|
|
61
|
+
options: { apiKey: 'your-api-key' }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
53
64
|
});
|
|
54
65
|
|
|
55
66
|
const result = await engine.sendMessage({
|
package/README.zh-CN.md
CHANGED
|
@@ -29,7 +29,14 @@ OriCore 是一个功能完整的 **AI 引擎库**,让你可以轻松地在任
|
|
|
29
29
|
import { createEngine } from 'oricore';
|
|
30
30
|
|
|
31
31
|
const engine = createEngine({ productName: 'MyApp', version: '1.0.0' });
|
|
32
|
-
await engine.initialize({
|
|
32
|
+
await engine.initialize({
|
|
33
|
+
model: 'deepseek/deepseek-chat',
|
|
34
|
+
provider: {
|
|
35
|
+
deepseek: {
|
|
36
|
+
options: { apiKey: 'your-key' }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
33
40
|
|
|
34
41
|
const result = await engine.sendMessage({ message: '帮我分析这个项目的结构', write: true });
|
|
35
42
|
console.log(result.data.text);
|
|
@@ -49,7 +56,11 @@ import { createEngine } from 'oricore';
|
|
|
49
56
|
const engine = createEngine({ productName: 'MyAIAssistant', version: '1.0.0' });
|
|
50
57
|
await engine.initialize({
|
|
51
58
|
model: 'deepseek/deepseek-chat',
|
|
52
|
-
provider: {
|
|
59
|
+
provider: {
|
|
60
|
+
deepseek: {
|
|
61
|
+
options: { apiKey: 'your-api-key' }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
53
64
|
});
|
|
54
65
|
|
|
55
66
|
const result = await engine.sendMessage({
|