Skip to content

Commit f886e6d

Browse files
Rename GenerateText -> ComputeText (#103)
1 parent 856c008 commit f886e6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ npm install substrate
2323
## Usage
2424

2525
```typescript
26-
import { Substrate, GenerateText, sb } from "substrate";
26+
import { Substrate, ComputeText, sb } from "substrate";
2727
```
2828

2929
Initialize the Substrate client.
@@ -32,16 +32,16 @@ Initialize the Substrate client.
3232
const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY });
3333
```
3434

35-
Generate a story using the [`GenerateText`](https://www.substrate.run/nodes#GenerateText) node.
35+
Generate a story using the [`ComputeText`](https://www.substrate.run/nodes#ComputeText) node.
3636

3737
```typescript
38-
const story = new GenerateText({ prompt: "tell me a story" });
38+
const story = new ComputeText({ prompt: "tell me a story" });
3939
```
4040

41-
Summarize the output of the `story` node using another `GenerateText` node. Because `story` has not yet been run, we use `sb.interpolate` to work with its future output.
41+
Summarize the output of the `story` node using another `ComputeText` node. Because `story` has not yet been run, we use `sb.interpolate` to work with its future output.
4242

4343
```typescript
44-
const summary = new GenerateText({
44+
const summary = new ComputeText({
4545
prompt: sb.interpolate`summarize this story in one sentence: ${story.future.text}`,
4646
});
4747
```

0 commit comments

Comments
 (0)