Skip to content

Commit 477d64f

Browse files
author
ajosh0504
committed
Updating codeblocks
1 parent 4cdb3d9 commit 477d64f

File tree

6 files changed

+34
-19
lines changed

6 files changed

+34
-19
lines changed

docs/40-agent-tools/2-create-vector-search-index.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,19 @@
22

33
To retrieve documents using vector search, you must configure a vector search index on the collection you want to perform vector search against.
44

5-
Run the cells under the **Step 3: Create a vector search index** section in the notebook to create a vector search index.
5+
Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 3: Create a vector search index** section in the notebook to create a vector search index.
6+
7+
The answers for code blocks in this section are as follows:
8+
9+
**CODE_BLOCK_1**
10+
11+
<details>
12+
<summary>Answer</summary>
13+
<div>
14+
15+
```python
16+
create_index(vs_collection, VS_INDEX_NAME, model)
17+
```
18+
19+
</div>
20+
</details>

docs/40-agent-tools/3-create-agent-tools.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The answers for code blocks in this section are as follows:
1414

1515
## Vector search tool
1616

17-
**CODE_BLOCK_1**
17+
**CODE_BLOCK_2**
1818

1919
<details>
2020
<summary>Answer</summary>
@@ -25,7 +25,7 @@ embedding_model.encode(text)
2525
</div>
2626
</details>
2727

28-
**CODE_BLOCK_2**
28+
**CODE_BLOCK_3**
2929

3030
<details>
3131
<summary>Answer</summary>
@@ -36,7 +36,7 @@ get_embedding(user_query)
3636
</div>
3737
</details>
3838

39-
**CODE_BLOCK_3**
39+
**CODE_BLOCK_4**
4040

4141
<details>
4242
<summary>Answer</summary>
@@ -64,7 +64,7 @@ get_embedding(user_query)
6464
</div>
6565
</details>
6666

67-
**CODE_BLOCK_4**
67+
**CODE_BLOCK_5**
6868

6969
<details>
7070
<summary>Answer</summary>
@@ -77,7 +77,7 @@ vs_collection.aggregate(pipeline)
7777

7878
## Get page content tool
7979

80-
**CODE_BLOCK_5**
80+
**CODE_BLOCK_6**
8181

8282
<details>
8383
<summary>Answer</summary>
@@ -88,7 +88,7 @@ vs_collection.aggregate(pipeline)
8888
</div>
8989
</details>
9090

91-
**CODE_BLOCK_6**
91+
**CODE_BLOCK_7**
9292

9393
<details>
9494
<summary>Answer</summary>
@@ -99,7 +99,7 @@ vs_collection.aggregate(pipeline)
9999
</div>
100100
</details>
101101

102-
**CODE_BLOCK_7**
102+
**CODE_BLOCK_8**
103103

104104
<details>
105105
<summary>Answer</summary>

docs/50-create-agent/3-instantiate-llm.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 6:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_88**
9+
**CODE_BLOCK_9**
1010

1111
<details>
1212
<summary>Answer</summary>
@@ -17,7 +17,7 @@ llm.bind_tools(tools)
1717
</div>
1818
</details>
1919

20-
**CODE_BLOCK_9**
20+
**CODE_BLOCK_10**
2121

2222
<details>
2323
<summary>Answer</summary>

docs/50-create-agent/4-define-graph-nodes.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 7:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_10**
9+
**CODE_BLOCK_11**
1010

1111
<details>
1212
<summary>Answer</summary>
@@ -17,7 +17,7 @@ state["messages"]
1717
</div>
1818
</details>
1919

20-
**CODE_BLOCK_11**
20+
**CODE_BLOCK_12**
2121

2222
<details>
2323
<summary>Answer</summary>
@@ -28,7 +28,7 @@ llm_with_tools.invoke(messages)
2828
</div>
2929
</details>
3030

31-
**CODE_BLOCK_12**
31+
**CODE_BLOCK_13**
3232

3333
<details>
3434
<summary>Answer</summary>

docs/50-create-agent/6-build-and-execute-graph.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 9:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_13**
9+
**CODE_BLOCK_14**
1010

1111
<details>
1212
<summary>Answer</summary>
@@ -17,7 +17,7 @@ graph.add_node("agent", agent)
1717
</div>
1818
</details>
1919

20-
**CODE_BLOCK_14**
20+
**CODE_BLOCK_15**
2121

2222
<details>
2323
<summary>Answer</summary>
@@ -28,7 +28,7 @@ graph.add_node("tools", tool_node)
2828
</div>
2929
</details>
3030

31-
**CODE_BLOCK_15**
31+
**CODE_BLOCK_16**
3232

3333
<details>
3434
<summary>Answer</summary>
@@ -39,7 +39,7 @@ graph.add_edge(START, "agent")
3939
</div>
4040
</details>
4141

42-
**CODE_BLOCK_16**
42+
**CODE_BLOCK_17**
4343

4444
<details>
4545
<summary>Answer</summary>
@@ -50,7 +50,7 @@ graph.add_edge("tools", "agent")
5050
</div>
5151
</details>
5252

53-
**CODE_BLOCK_17**
53+
**CODE_BLOCK_18**
5454

5555
<details>
5656
<summary>Answer</summary>

docs/60-adding-memory/2-adding-memory.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 11:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_18**
9+
**CODE_BLOCK_19**
1010

1111
<details>
1212
<summary>Answer</summary>

0 commit comments

Comments
 (0)