bitfab 0.9.2 → 0.11.4

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 CHANGED
@@ -85,11 +85,11 @@ pnpm validate
85
85
  ### Basic Installation
86
86
 
87
87
  ```bash
88
- npm install @goharvest/bitfab
88
+ npm install bitfab
89
89
  # or
90
- pnpm add @goharvest/bitfab
90
+ pnpm add bitfab
91
91
  # or
92
- yarn add @goharvest/bitfab
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 @goharvest/bitfab @openai/agents
100
+ npm install bitfab @openai/agents
101
101
  # or
102
- pnpm add @goharvest/bitfab @openai/agents
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 @harvest/bitfab
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 @harvest/bitfab
128
- pnpm add @harvest/bitfab
127
+ pnpm unlink bitfab
128
+ pnpm add bitfab
129
129
  ```
130
130
 
131
131
  ## Usage
@@ -135,10 +135,10 @@ 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 "@goharvest/bitfab";
138
+ import { Bitfab } from "bitfab";
139
139
 
140
140
  const client = new Bitfab({
141
- apiKey: "sf_your_api_key_here", // Required: Your Bitfab API key
141
+ apiKey: "bf_your_api_key_here", // Required: Your Bitfab API key
142
142
  serviceUrl: "https://bitfab.ai", // Optional
143
143
  envVars: {
144
144
  OPENAI_API_KEY: process.env.OPENAI_API_KEY, // Your LLM provider API keys
@@ -158,7 +158,7 @@ If you prefer to execute BAML on the server (using the server's API keys), set `
158
158
 
159
159
  ```typescript
160
160
  const client = new Bitfab({
161
- apiKey: "sf_your_api_key_here",
161
+ apiKey: "bf_your_api_key_here",
162
162
  executeLocally: false, // Execute on server instead of locally
163
163
  });
164
164
 
@@ -188,10 +188,10 @@ console.log(result.answer); // TypeScript knows this is a string
188
188
  ### Error Handling
189
189
 
190
190
  ```typescript
191
- import { Bitfab, BitfabError } from "@goharvest/bitfab";
191
+ import { Bitfab, BitfabError } from "bitfab";
192
192
 
193
193
  const client = new Bitfab({
194
- apiKey: "sf_your_api_key_here",
194
+ apiKey: "bf_your_api_key_here",
195
195
  serviceUrl: "https://your-bitfab-instance.com",
196
196
  });
197
197
 
@@ -268,7 +268,7 @@ A test script is provided to verify both local and server-side execution:
268
268
 
269
269
  ```bash
270
270
  # Set up environment variables
271
- export BITFAB_API_KEY="sf_your_api_key"
271
+ export BITFAB_API_KEY="bf_your_api_key"
272
272
  export OPENAI_API_KEY="your_openai_key"
273
273
 
274
274
  # Run the test script