Skip to content

Commit 3c9b5ea

Browse files
Change GenerateText -> ComputeText (#40)
1 parent cca8fb1 commit 3c9b5ea

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
@@ -24,7 +24,7 @@ pip install substrate
2424
## Usage
2525

2626
```python
27-
from substrate import Substrate, GenerateText, sb
27+
from substrate import Substrate, ComputeText, sb
2828
```
2929

3030
Initialize the Substrate client.
@@ -33,16 +33,16 @@ Initialize the Substrate client.
3333
substrate = Substrate(api_key=SUBSTRATE_API_KEY)
3434
```
3535

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

3838
```python
39-
story = GenerateText(prompt="tell me a story")
39+
story = ComputeText(prompt="tell me a story")
4040
```
4141

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

4444
```python
45-
summary = GenerateText(prompt=sb.concat("summarize this story in one sentence: ", story.future.text))
45+
summary = ComputeText(prompt=sb.concat("summarize this story in one sentence: ", story.future.text))
4646
```
4747

4848
Run the graph chaining `story``summary` by passing the terminal node to `substrate.run`.

0 commit comments

Comments
 (0)