bitfab 0.9.2 → 0.11.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 +10 -10
- package/dist/{chunk-WUJR72QY.js → chunk-6EZCV5TU.js} +1014 -3
- package/dist/chunk-6EZCV5TU.js.map +1 -0
- package/dist/{chunk-VGALEXKQ.js → chunk-C4KRLEXZ.js} +47 -47
- package/dist/chunk-C4KRLEXZ.js.map +1 -0
- package/dist/index.cjs +1059 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +221 -3
- package/dist/index.d.ts +221 -3
- package/dist/index.js +6 -2
- package/dist/node.cjs +1020 -1
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +6 -2
- package/dist/node.js.map +1 -1
- package/dist/{replay-DJ2HXTHQ.js → replay-PIWVDXIF.js} +2 -2
- package/package.json +3 -3
- package/dist/chunk-VGALEXKQ.js.map +0 -1
- package/dist/chunk-WUJR72QY.js.map +0 -1
- /package/dist/{replay-DJ2HXTHQ.js.map → replay-PIWVDXIF.js.map} +0 -0
package/README.md
CHANGED
|
@@ -85,11 +85,11 @@ pnpm validate
|
|
|
85
85
|
### Basic Installation
|
|
86
86
|
|
|
87
87
|
```bash
|
|
88
|
-
npm install
|
|
88
|
+
npm install bitfab
|
|
89
89
|
# or
|
|
90
|
-
pnpm add
|
|
90
|
+
pnpm add bitfab
|
|
91
91
|
# or
|
|
92
|
-
yarn add
|
|
92
|
+
yarn add bitfab
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
### With OpenAI Agents SDK Tracing
|
|
@@ -97,9 +97,9 @@ yarn add @goharvest/bitfab
|
|
|
97
97
|
If you want to use the OpenAI Agents SDK tracing integration:
|
|
98
98
|
|
|
99
99
|
```bash
|
|
100
|
-
npm install
|
|
100
|
+
npm install bitfab @openai/agents
|
|
101
101
|
# or
|
|
102
|
-
pnpm add
|
|
102
|
+
pnpm add bitfab @openai/agents
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
The `@openai/agents` package is an optional peer dependency - the SDK works fine without it unless you need tracing functionality.
|
|
@@ -118,14 +118,14 @@ To link for local development:
|
|
|
118
118
|
pnpm link --global
|
|
119
119
|
|
|
120
120
|
# In your app directory
|
|
121
|
-
pnpm link --global
|
|
121
|
+
pnpm link --global bitfab
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
To switch back to npm version:
|
|
125
125
|
|
|
126
126
|
```bash
|
|
127
|
-
pnpm unlink
|
|
128
|
-
pnpm add
|
|
127
|
+
pnpm unlink bitfab
|
|
128
|
+
pnpm add bitfab
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
## Usage
|
|
@@ -135,7 +135,7 @@ pnpm add @harvest/bitfab
|
|
|
135
135
|
By default, the SDK executes BAML functions **locally on the client** by fetching the BAML prompt from the server and running it with your own API keys:
|
|
136
136
|
|
|
137
137
|
```typescript
|
|
138
|
-
import { Bitfab } from "
|
|
138
|
+
import { Bitfab } from "bitfab";
|
|
139
139
|
|
|
140
140
|
const client = new Bitfab({
|
|
141
141
|
apiKey: "sf_your_api_key_here", // Required: Your Bitfab API key
|
|
@@ -188,7 +188,7 @@ console.log(result.answer); // TypeScript knows this is a string
|
|
|
188
188
|
### Error Handling
|
|
189
189
|
|
|
190
190
|
```typescript
|
|
191
|
-
import { Bitfab, BitfabError } from "
|
|
191
|
+
import { Bitfab, BitfabError } from "bitfab";
|
|
192
192
|
|
|
193
193
|
const client = new Bitfab({
|
|
194
194
|
apiKey: "sf_your_api_key_here",
|