Skip to content

Commit

Permalink
Adjusting code block numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
ajosh0504 committed Jul 23, 2024
1 parent c4b9b17 commit faec378
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 35 deletions.
15 changes: 2 additions & 13 deletions docs/50-prepare-the-data/5-ingest-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,13 @@ The answers for code blocks in this section are as follows:
<summary>Answer</summary>
<div>
```python
MongoClient(MONGODB_URI)
mongodb_client[DB_NAME][COLLECTION_NAME]
```
</div>
</details>

**CODE_BLOCK_12**

<details>
<summary>Answer</summary>
<div>
```python
mongo_client[DB_NAME][COLLECTION_NAME]
```
</div>
</details>

**CODE_BLOCK_13**

<details>
<summary>Answer</summary>
<div>
Expand All @@ -41,7 +30,7 @@ collection.delete_many({})
</div>
</details>

**CODE_BLOCK_14**
**CODE_BLOCK_13**

<details>
<summary>Answer</summary>
Expand Down
6 changes: 3 additions & 3 deletions docs/60-perform-semantic-search/3-vector-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 8:

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

**CODE_BLOCK_15**
**CODE_BLOCK_14**

<details>
<summary>Answer</summary>
Expand All @@ -17,7 +17,7 @@ get_embedding(user_query)
</div>
</details>

**CODE_BLOCK_16**
**CODE_BLOCK_15**

<details>
<summary>Answer</summary>
Expand Down Expand Up @@ -45,7 +45,7 @@ get_embedding(user_query)
</div>
</details>

**CODE_BLOCK_17**
**CODE_BLOCK_16**

<details>
<summary>Answer</summary>
Expand Down
8 changes: 4 additions & 4 deletions docs/60-perform-semantic-search/4-pre-filtering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **🦹‍

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

**CODE_BLOCK_18**
**CODE_BLOCK_17**

<details>
<summary>Answer</summary>
Expand All @@ -34,7 +34,7 @@ The answers for code blocks in this section are as follows:
</div>
</details>

**CODE_BLOCK_19**
**CODE_BLOCK_18**

<details>
<summary>Answer</summary>
Expand Down Expand Up @@ -63,7 +63,7 @@ The answers for code blocks in this section are as follows:
</div>
</details>

**CODE_BLOCK_20**
**CODE_BLOCK_19**

<details>
<summary>Answer</summary>
Expand Down Expand Up @@ -91,7 +91,7 @@ The answers for code blocks in this section are as follows:
</div>
</details>

**CODE_BLOCK_21**
**CODE_BLOCK_20**

<details>
<summary>Answer</summary>
Expand Down
6 changes: 3 additions & 3 deletions docs/70-build-rag-app/1-build-rag-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 9:

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

**CODE_BLOCK_22**
**CODE_BLOCK_21**

<details>
<summary>Answer</summary>
Expand All @@ -17,7 +17,7 @@ vector_search(user_query)
</div>
</details>

**CODE_BLOCK_23**
**CODE_BLOCK_22**

<details>
<summary>Answer</summary>
Expand All @@ -28,7 +28,7 @@ vector_search(user_query)
</div>
</details>

**CODE_BLOCK_24**
**CODE_BLOCK_23**

<details>
<summary>Answer</summary>
Expand Down
4 changes: 2 additions & 2 deletions docs/70-build-rag-app/2-add-reranking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **🦹‍

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

**CODE_BLOCK_25**
**CODE_BLOCK_24**

<details>
<summary>Answer</summary>
Expand All @@ -19,7 +19,7 @@ rerank_model.rank(
</div>
</details>

**CODE_BLOCK_26**
**CODE_BLOCK_25**

<details>
<summary>Answer</summary>
Expand Down
4 changes: 2 additions & 2 deletions docs/70-build-rag-app/3-stream-responses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **🦹‍

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

**CODE_BLOCK_27**
**CODE_BLOCK_26**

<details>
<summary>Answer</summary>
Expand All @@ -27,7 +27,7 @@ fw_client.chat.completions.create(
</div>
</details>

**CODE_BLOCK_28**
**CODE_BLOCK_27**

<details>
<summary>Answer</summary>
Expand Down
16 changes: 8 additions & 8 deletions docs/80-add-memory/2-add-memory.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 10:

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

**CODE_BLOCK_29**
**CODE_BLOCK_28**

<details>
<summary>Answer</summary>
Expand All @@ -17,7 +17,7 @@ history_collection.create_index("session_id")
</div>
</details>

**CODE_BLOCK_30**
**CODE_BLOCK_29**

<details>
<summary>Answer</summary>
Expand All @@ -33,7 +33,7 @@ history_collection.create_index("session_id")
</div>
</details>

**CODE_BLOCK_31**
**CODE_BLOCK_30**

<details>
<summary>Answer</summary>
Expand All @@ -44,7 +44,7 @@ history_collection.insert_one(message)
</div>
</details>

**CODE_BLOCK_32**
**CODE_BLOCK_31**

<details>
<summary>Answer</summary>
Expand All @@ -55,7 +55,7 @@ history_collection.find({"session_id": session_id}).sort("timestamp", 1)
</div>
</details>

**CODE_BLOCK_33**
**CODE_BLOCK_32**

<details>
<summary>Answer</summary>
Expand All @@ -66,7 +66,7 @@ history_collection.find({"session_id": session_id}).sort("timestamp", 1)
</div>
</details>

**CODE_BLOCK_34**
**CODE_BLOCK_33**

<details>
<summary>Answer</summary>
Expand All @@ -78,7 +78,7 @@ messages.extend(message_history)
</div>
</details>

**CODE_BLOCK_35**
**CODE_BLOCK_34**

<details>
<summary>Answer</summary>
Expand All @@ -90,7 +90,7 @@ messages.append(user_message)
</div>
</details>

**CODE_BLOCK_36**
**CODE_BLOCK_35**

<details>
<summary>Answer</summary>
Expand Down

0 comments on commit faec378

Please sign in to comment.