Skip to content

Commit ceffead

Browse files
authored
Merge pull request #51 from kou/getting-started-fix-indent
getting-started: Fix indent of code blocks in item list
2 parents 2453da9 + 086e9ca commit ceffead

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/guides/getting-started/conversation_py.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -72,32 +72,32 @@ sidebar_position: 1
7272

7373
- This section imports and initializes the node.
7474

75-
```python
76-
from dora import Node
77-
import pyarrow as pa
75+
```python
76+
from dora import Node
77+
import pyarrow as pa
7878

79-
def main():
80-
node = Node()
81-
```
79+
def main():
80+
node = Node()
81+
```
8282

8383
- This part of the code checks to see if the node has received any input, and if it has, it will print out some data relating to the input.
8484

85-
```python
86-
for event in node:
87-
if event["type"] == "INPUT":
88-
print(
89-
f"""Node received:
90-
id: {event["id"]},
91-
value: {event["value"]},
92-
metadata: {event["metadata"]}"""
93-
)
94-
```
85+
```python
86+
for event in node:
87+
if event["type"] == "INPUT":
88+
print(
89+
f"""Node received:
90+
id: {event["id"]},
91+
value: {event["value"]},
92+
metadata: {event["metadata"]}"""
93+
)
94+
```
9595

9696
- This line send an output to other nodes.
9797

98-
```python
99-
node.send_output("speech", pa.array(["Hello World"])) # add this line
100-
```
98+
```python
99+
node.send_output("speech", pa.array(["Hello World"])) # add this line
100+
```
101101

102102
- We are using the `send_output` method to send a string as an arrow array to the listener node.
103103
- The first argument is the id of the output we want to send to be referenced later in the dataflow.

0 commit comments

Comments
 (0)