rhachet-brains-xai 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +4 -1
  2. package/readme.md +2 -2
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "rhachet-brains-xai",
3
3
  "author": "ehmpathy",
4
4
  "description": "rhachet brain.atom adapter for xai grok models",
5
- "version": "0.1.1",
5
+ "version": "0.1.3",
6
6
  "repository": "ehmpathy/rhachet-brains-xai",
7
7
  "homepage": "https://github.com/ehmpathy/rhachet-brains-xai",
8
8
  "keywords": [
@@ -65,6 +65,9 @@
65
65
  "type-fns": "1.21.0",
66
66
  "zod": "4.3.4"
67
67
  },
68
+ "peerDependencies": {
69
+ "rhachet": ">=1.21.4"
70
+ },
68
71
  "devDependencies": {
69
72
  "@biomejs/biome": "2.3.8",
70
73
  "@commitlint/cli": "19.5.0",
package/readme.md CHANGED
@@ -18,14 +18,14 @@ import { z } from 'zod';
18
18
  const brainAtom = genBrainAtom({ slug: 'xai/grok-code-fast-1' });
19
19
 
20
20
  // simple string output
21
- const response = await brainAtom.ask({
21
+ const explanation = await brainAtom.ask({
22
22
  role: { briefs: [] },
23
23
  prompt: 'explain this code',
24
24
  schema: { output: z.string() },
25
25
  });
26
26
 
27
27
  // structured object output
28
- const result = await brainAtom.ask({
28
+ const { summary, issues } = await brainAtom.ask({
29
29
  role: { briefs: [] },
30
30
  prompt: 'analyze this code',
31
31
  schema: { output: z.object({ summary: z.string(), issues: z.array(z.string()) }) },