x402-omni-oracle 0.1.0 → 0.1.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 +33 -0
- package/dist/index.d.ts +763 -0
- package/dist/index.js +719 -0
- package/package.json +2 -2
- package/src/index.ts +152 -322
- package/tsconfig.json +16 -0
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Omni-Oracle x Vercel AI SDK Integration
|
|
2
|
+
|
|
3
|
+
This package provides **TypeScript Tools** for the Omni-Oracle service, compatible with the Vercel AI SDK (`ai` package).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install x402-omni-oracle
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Import the tools and pass them to your model:
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { getAlphaCorrelationMatrix, getPerformanceMetrics } from 'x402-omni-oracle';
|
|
17
|
+
import { openai } from '@ai-sdk/openai';
|
|
18
|
+
import { generateText } from 'ai';
|
|
19
|
+
|
|
20
|
+
const result = await generateText({
|
|
21
|
+
model: openai('gpt-4'),
|
|
22
|
+
tools: {
|
|
23
|
+
getAlphaCorrelationMatrix,
|
|
24
|
+
getPerformanceMetrics
|
|
25
|
+
},
|
|
26
|
+
prompt: 'Check the 30-day correlation between BTC and ETH.'
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## New Features
|
|
31
|
+
|
|
32
|
+
- **Compute Moat**: `getAlphaCorrelationMatrix` (Heavy Compute)
|
|
33
|
+
- **Trust Layer**: `getPerformanceMetrics` (Victory Log)
|