Skip to content

Commit 627b708

Browse files
committed
Generated markdown tutorials from Jupyter Notebooks
Generated from: couchbase-examples/vector-search-cookbook
1 parent 7c3c4a2 commit 627b708

14 files changed

+2252
-565
lines changed

tutorial/markdown/generated/vector-search-cookbook/CouchbaseStorage_Demo.md

Lines changed: 349 additions & 54 deletions
Large diffs are not rendered by default.

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_AzureOpenAI.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ To build our semantic search engine, we need a robust set of tools. The librarie
5959

6060

6161
```python
62-
!pip install datasets langchain-couchbase langchain-openai
62+
!pip install datasets==3.5.0 langchain-couchbase==0.3.0 langchain-openai==0.3.13
6363
```
6464

65-
[Output too long, omitted for brevity]
66-
6765
# Importing Necessary Libraries
6866
The script starts by importing a series of libraries required for various tasks, including handling JSON, logging, time tracking, Couchbase connections, embedding generation, and dataset loading. These libraries provide essential functions for working with data, managing database connections, and processing machine learning models.
6967

@@ -98,6 +96,10 @@ from langchain_openai import AzureChatOpenAI, AzureOpenAIEmbeddings
9896
from tqdm import tqdm
9997
```
10098

99+
/Users/aayush.tyagi/Documents/AI/vector-search-cookbook/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
100+
from .autonotebook import tqdm as notebook_tqdm
101+
102+
101103
# Setup Logging
102104
Logging is configured to track the progress of the script and capture any errors or warnings. This is crucial for debugging and understanding the flow of execution. The logging output includes timestamps, log levels (e.g., INFO, ERROR), and messages that describe what is happening in the script.
103105

@@ -194,6 +196,7 @@ def setup_collection(cluster, bucket_name, scope_name, collection_name):
194196
logging.info(f"Collection '{collection_name}' already exists.Skipping creation.")
195197

196198
collection = bucket.scope(scope_name).collection(collection_name)
199+
time.sleep(2) # Give the collection time to be ready for queries
197200

198201
# Ensure primary index exists
199202
try:

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_Bedrock.md

Lines changed: 61 additions & 48 deletions
Large diffs are not rendered by default.

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_Claude(by_Anthropic).md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To build our semantic search engine, we need a robust set of tools. The librarie
6161

6262

6363
```python
64-
%pip install --quiet datasets langchain-couchbase langchain-anthropic langchain-openai python-dotenv
64+
%pip install --quiet datasets==3.5.0 langchain-couchbase==0.3.0 langchain-anthropic==0.3.11 langchain-openai==0.3.13 python-dotenv==1.1.0
6565
```
6666

6767
Note: you may need to restart the kernel to use updated packages.
@@ -208,6 +208,7 @@ def setup_collection(cluster, bucket_name, scope_name, collection_name):
208208
num_replicas=0
209209
)
210210
cluster.buckets().create_bucket(bucket_settings)
211+
time.sleep(2) # Wait for bucket creation to complete and become available
211212
bucket = cluster.bucket(bucket_name)
212213
logging.info(f"Bucket '{bucket_name}' created successfully.")
213214

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_Cohere.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To build our semantic search engine, we need a robust set of tools. The librarie
6060

6161

6262
```python
63-
%pip install --quiet datasets langchain-couchbase langchain-cohere python-dotenv
63+
%pip install --quiet datasets==3.5.0 langchain-couchbase==0.3.0 langchain-cohere==0.4.4 python-dotenv==1.1.0
6464
```
6565

6666
Note: you may need to restart the kernel to use updated packages.
@@ -205,6 +205,7 @@ def setup_collection(cluster, bucket_name, scope_name, collection_name):
205205
num_replicas=0
206206
)
207207
cluster.buckets().create_bucket(bucket_settings)
208+
time.sleep(2) # Wait for bucket creation to complete and become available
208209
bucket = cluster.bucket(bucket_name)
209210
logging.info(f"Bucket '{bucket_name}' created successfully.")
210211

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_CrewAI.md

Lines changed: 151 additions & 325 deletions
Large diffs are not rendered by default.

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_Jina_AI.md

Lines changed: 57 additions & 68 deletions
Large diffs are not rendered by default.

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_Openrouter_Deepseek.md

Lines changed: 868 additions & 0 deletions
Large diffs are not rendered by default.

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_PydanticAI.md

Lines changed: 415 additions & 58 deletions
Large diffs are not rendered by default.

tutorial/markdown/generated/vector-search-cookbook/RAG_with_Couchbase_and_SmolAgents.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To build our semantic search engine, we need a robust set of tools. The librarie
5656

5757

5858
```python
59-
%pip install --quiet -U datasets langchain-couchbase langchain-openai python-dotenv smolagents ipywidgets
59+
%pip install --quiet -U datasets==3.5.0 langchain-couchbase==0.3.0 langchain-openai==0.3.13 python-dotenv==1.1.0 smolagents==1.13.0 ipywidgets==8.1.6
6060
```
6161

6262
# Importing Necessary Libraries
@@ -187,6 +187,7 @@ def setup_collection(cluster, bucket_name, scope_name, collection_name):
187187
num_replicas=0
188188
)
189189
cluster.buckets().create_bucket(bucket_settings)
190+
time.sleep(2) # Wait for bucket creation to complete and become available
190191
bucket = cluster.bucket(bucket_name)
191192
logging.info(f"Bucket '{bucket_name}' created successfully.")
192193

@@ -606,8 +607,11 @@ more uncomfortable than when the situation is going well, always that happened.
606607
Sporting side managed by Ruben Amorim, who will be in the United dugout at the weekend. City dominated the first
607608
half in Lisbon, led thanks to Phil Foden's early effort and looked to be cruising. Instead, they conceded three
608609
times in <span style="color: #008080; text-decoration-color: #008080; font-weight: bold">11</span> minutes either side of half-time as Sporting eventually ran out <span style="color: #008080; text-decoration-color: #008080; font-weight: bold">4</span>-<span style="color: #008080; text-decoration-color: #008080; font-weight: bold">1</span> winners.
610+
609611
...
612+
610613
...
614+
611615
Afterwards Guardiola was calm, so much so it was difficult to hear him in the news conference, a contrast to the
612616
frustrated figure he cut on the touchline. He said: <span style="color: #008000; text-decoration-color: #008000">"It depends on us. The solution is bring the players back. We </span>
613617
<span style="color: #008000; text-decoration-color: #008000">have just one central defender fit, that is difficult. We are going to try next game - another opportunity and we </span>

0 commit comments

Comments
 (0)