@idiomark/inference 0.0.0-stage → 0.1.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 +50 -2
- package/package.json +43 -5
package/README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @idiomark/inference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Apply personality to AI responses - the core Idiomark product**
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @idiomark/inference
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { InferenceEngine, createPrompt } from '@idiomark/inference'
|
|
15
|
+
|
|
16
|
+
// Load Idiomark file
|
|
17
|
+
const myIdiomark = JSON.parse(fs.readFileSync('my-personality.idiomark.json'))
|
|
18
|
+
|
|
19
|
+
// Create engine
|
|
20
|
+
const engine = new InferenceEngine({
|
|
21
|
+
idiomark: myIdiomark,
|
|
22
|
+
provider: 'anthropic',
|
|
23
|
+
mode: 'balanced'
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
// Get response with personality
|
|
27
|
+
const response = await engine.respond('How do I center a div?')
|
|
28
|
+
console.log(response.content)
|
|
29
|
+
// Output: "Sure thing! 🚀 Just use flexbox or grid..."
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Response Modes
|
|
33
|
+
|
|
34
|
+
- `strict` - Follow personality exactly
|
|
35
|
+
- `balanced` - Personality + helpfulness (default)
|
|
36
|
+
- `subtle` - Light personality touch
|
|
37
|
+
- `custom` - User-defined mix
|
|
38
|
+
|
|
39
|
+
## API
|
|
40
|
+
|
|
41
|
+
| Method | Description |
|
|
42
|
+
|--------|-------------|
|
|
43
|
+
| `respond(message)` | Get personality-enhanced response |
|
|
44
|
+
| `setPersonality(idiomark)` | Update personality |
|
|
45
|
+
| `setMode(mode)` | Change response mode |
|
|
46
|
+
| `setContext(context)` | Set conversation history |
|
|
47
|
+
| `clearContext()` | Clear conversation |
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@idiomark/inference",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
1
|
+
{
|
|
2
|
+
"name": "@idiomark/inference",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Idiomark Inference API - Apply personality to AI responses",
|
|
5
|
+
"main": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.mts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.mts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"idiomark",
|
|
18
|
+
"personality",
|
|
19
|
+
"inference",
|
|
20
|
+
"ai",
|
|
21
|
+
"llm"
|
|
22
|
+
],
|
|
23
|
+
"author": "Idiomark Protocol Contributors",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@idiomark/core": "workspace:*"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"typescript": "^5.7.3",
|
|
30
|
+
"tsup": "^2.0.0"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/idiomark/idiomark.git",
|
|
35
|
+
"directory": "packages/inference"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/idiomark/idiomark#readme",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/idiomark/idiomark/issues"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
}
|
|
6
44
|
}
|