@future-explorer/lib 1.0.6 → 1.0.7

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/README.md +23 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -33,7 +33,7 @@ const response = await client.getGenericStructuredResponse<PersonInfo>({
33
33
  model: 'grok-2-latest',
34
34
  messages: [
35
35
  { role: 'system', content: 'You are a helpful assistant.' },
36
- { role: 'user', content: 'Extract data from this text...' }
36
+ { role: 'user', content: 'Extract data from this text...' },
37
37
  ],
38
38
  tools: [
39
39
  {
@@ -44,11 +44,11 @@ const response = await client.getGenericStructuredResponse<PersonInfo>({
44
44
  type: 'object',
45
45
  properties: {
46
46
  name: { type: 'string' },
47
- age: { type: 'number' }
47
+ age: { type: 'number' },
48
48
  },
49
- required: ['name', 'age']
50
- }
51
- }
49
+ required: ['name', 'age'],
50
+ },
51
+ },
52
52
  ],
53
53
  });
54
54
 
@@ -93,17 +93,17 @@ const result = await client.generateStructuredResponse(
93
93
  'You are a sentiment analysis expert.'
94
94
  );
95
95
 
96
- console.log(result.sentiment); // 'positive'
97
- console.log(result.confidence); // 0.95
98
- console.log(result.summary); // '...'
96
+ console.log(result.sentiment); // 'positive'
97
+ console.log(result.confidence); // 0.95
98
+ console.log(result.summary); // '...'
99
99
  ```
100
100
 
101
101
  ### Providers
102
102
 
103
- | Provider | Enum Value | Required Environment Variables |
104
- |----------|------------|-------------------------------|
105
- | OpenAI | `Provider.OpenAI` | `OPENAI_API_KEY`, `MODEL_OPEN_AI` |
106
- | XAI (Grok) | `Provider.XAI` | `XAI_API_KEY`, `MODEL_XAI` |
103
+ | Provider | Enum Value | Required Environment Variables |
104
+ | ------------- | ----------------- | ---------------------------------------------- |
105
+ | OpenAI | `Provider.OpenAI` | `OPENAI_API_KEY`, `MODEL_OPEN_AI` |
106
+ | XAI (Grok) | `Provider.XAI` | `XAI_API_KEY`, `MODEL_XAI` |
107
107
  | Google Gemini | `Provider.Gemini` | `GOOGLE_GENERATIVE_AI_API_KEY`, `MODEL_GEMINI` |
108
108
 
109
109
  ### Methods
@@ -161,6 +161,16 @@ npm publish
161
161
  ./scripts/publish.sh [patch|minor|major]
162
162
  ```
163
163
 
164
+ ## Changelog
165
+
166
+ ### 1.0.7
167
+
168
+ - Updated peer dependency to zod 4.2.x
169
+
170
+ ### 1.0.6
171
+
172
+ - Added UnifiedAiClient with multi-provider support (OpenAI, XAI, Gemini)
173
+
164
174
  ## License
165
175
 
166
- ISC
176
+ ISC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@future-explorer/lib",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Shared utilities and clients for Future Explorer projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -49,7 +49,7 @@
49
49
  "ai": "^5.0.92"
50
50
  },
51
51
  "peerDependencies": {
52
- "zod": "^3.0.0"
52
+ "zod": "^4.2.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^24.5.2",