Skip to content

Commit ada08f0

Browse files
authored
Merge pull request #115 from Azure-Samples/oct-update
Oct update
2 parents a5a3c74 + d97c9cc commit ada08f0

File tree

4 files changed

+67
-61
lines changed

4 files changed

+67
-61
lines changed

frontend/package-lock.json

Lines changed: 21 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
"@types/react": "^18.3.3",
3636
"@types/react-dom": "^18.3.0",
3737
"@types/react-syntax-highlighter": "^15.5.13",
38-
"@vitejs/plugin-react": "^4.3.1",
38+
"@vitejs/plugin-react": "^4.3.2",
3939
"eslint": "^8.57.0",
4040
"eslint-plugin-react": "^7.34.3",
4141
"globals": "^15.6.0",
42-
"prettier": "^3.0.3",
43-
"typescript": "^5.5.3",
42+
"prettier": "^3.3.3",
43+
"typescript": "^5.6.3",
4444
"typescript-eslint": "^7.13.1",
4545
"vite": "^5.4.8",
4646
"rollup-plugin-visualizer": "^5.12.0"

rag-azure-openai-cosmosdb-langchain-notebook.ipynb

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
16-
"%pip install langchain==0.3.1\n",
17-
"%pip install langchain-openai==0.2.1\n",
18-
"%pip install pymongo==4.9.1"
16+
"%pip install langchain==0.3.4\n",
17+
"%pip install langchain-openai==0.2.3\n",
18+
"%pip install pymongo==4.10.1"
1919
]
2020
},
2121
{
@@ -104,7 +104,7 @@
104104
"name": "stderr",
105105
"output_type": "stream",
106106
"text": [
107-
"/var/folders/db/x_x115ns61154jxycm1mwr780000gn/T/ipykernel_61994/1277193319.py:17: UserWarning: You appear to be connected to a CosmosDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/cosmosdb\n",
107+
"/var/folders/db/x_x115ns61154jxycm1mwr780000gn/T/ipykernel_54773/1277193319.py:17: UserWarning: You appear to be connected to a CosmosDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/cosmosdb\n",
108108
" mongo_client = MongoClient(mongo_connection_string)\n"
109109
]
110110
}
@@ -369,8 +369,9 @@
369369
"name": "stdout",
370370
"output_type": "stream",
371371
"text": [
372-
"Why don't scientists trust atoms? \n",
373-
"Because they make up everything.\n"
372+
"Why don't scientists trust atoms?\n",
373+
"\n",
374+
"Because they make up everything!\n"
374375
]
375376
}
376377
],
@@ -389,13 +390,15 @@
389390
"name": "stdout",
390391
"output_type": "stream",
391392
"text": [
392-
"Education is a fundamental aspect of human life. It is the process of acquiring knowledge, skills, values, and attitudes that enable individuals to lead fulfilling lives. Education plays a crucial role in shaping individuals and communities. It equips people with the necessary tools to navigate the complexities of the world and make informed decisions.\n",
393+
"Education is a fundamental aspect of human development. It plays a pivotal role in shaping individuals' minds, fostering critical thinking skills, and equipping them with the necessary knowledge and skills to succeed in life. Education is not confined to the walls of a classroom; it encompasses a broader spectrum of learning experiences that occur throughout a person's lifetime.\n",
394+
"\n",
395+
"Firstly, education provides individuals with a solid foundation of knowledge. From basic literacy and numeracy skills to more advanced subjects like science, history, and literature, education broadens our understanding of the world around us. It helps us make informed decisions and enables us to contribute meaningfully to society.\n",
393396
"\n",
394-
"Education is not just about academic learning, but also about social, emotional, and ethical development. It teaches individuals how to communicate effectively, work collaboratively, and think critically. Education is essential for personal growth and development, but it also has broader social and economic benefits. Educated individuals are more likely to contribute positively to society and have better employment opportunities.\n",
397+
"Furthermore, education fosters critical thinking and problem-solving skills. It encourages individuals to question, analyze, and think independently. Through various teaching methods such as discussions, research projects, and practical applications, education promotes creativity and innovation. It equips individuals with the ability to tackle challenges and find solutions, preparing them for the complexities of the modern world.\n",
395398
"\n",
396-
"Education is a human right, and access to quality education should be available to all. Unfortunately, not everyone has equal access to education, and this inequality leads to social and economic disparities. Governments must invest in education to ensure that every individual has access to quality education, regardless of their socio-economic background.\n",
399+
"Education also empowers individuals by providing them with opportunities for personal and professional growth. It opens doors to better job prospects, higher earning potential, and improved social status. Moreover, education promotes lifelong learning, allowing individuals to adapt to changing circumstances and acquire new skills throughout their lives.\n",
397400
"\n",
398-
"In conclusion, education is a powerful tool that can transform individuals and communities. It provides individuals with the knowledge, skills, and values necessary to lead fulfilling lives. Governments must prioritize education to ensure that every individual has access to quality education, and to promote social and economic equality."
401+
"In conclusion, education is a powerful tool that has the potential to transform lives. It instills a love for learning, nurtures critical thinking skills, and empowers individuals to reach their full potential. By investing in education, societies can pave the way for a brighter future, where individuals are equipped with the knowledge and skills to overcome challenges and contribute positively to their communities."
399402
]
400403
}
401404
],
@@ -507,7 +510,7 @@
507510
"name": "stdout",
508511
"output_type": "stream",
509512
"text": [
510-
"What vegan options do you offer?\n"
513+
"What vegan options do you have?\n"
511514
]
512515
}
513516
],
@@ -528,7 +531,7 @@
528531
"name": "stdout",
529532
"output_type": "stream",
530533
"text": [
531-
"[DataPoint(name='Beyond Burger', description='Served with Romaine lettuce, tomato, pickle, vegan mayonnaise, ketchup, and mustard on a toasted bun. Sandwich made with whole wheat bread. Can be made as a wrap in a whole wheat tortilla. Served with kettle potato chips or corn tortilla chips.', price='9.0 USD', category='Sandwiches', collection=None), DataPoint(name='Tofu Salad Sandwich', description='Served with Romaine lettuce, tomato, vegan mayonnaise, and mustard. Sandwich made with whole wheat bread. Can be made as a wrap in a whole wheat tortilla. Served with kettle potato chips or corn tortilla chips.', price='9.0 USD', category='Sandwiches', collection=None), DataPoint(name=\"Boca Chik'n Sandwich\", description='Served with Romaine lettuce, tomato, pickle, vegan mayonnaise, ketchup, and mustard on a toasted bun. Sandwich made with whole wheat bread. Can be made as a wrap in a whole wheat tortilla. Served with kettle potato chips or corn tortilla chips.', price='9.0 USD', category='Sandwiches', collection=None)]\n"
534+
"[DataPoint(name='Beyond Burger', description='Served with Romaine lettuce, tomato, pickle, vegan mayonnaise, ketchup, and mustard on a toasted bun. Sandwich made with whole wheat bread. Can be made as a wrap in a whole wheat tortilla. Served with kettle potato chips or corn tortilla chips.', price='9.0 USD', category='Sandwiches', collection=None), DataPoint(name='Tofu Salad Sandwich', description='Served with Romaine lettuce, tomato, vegan mayonnaise, and mustard. Sandwich made with whole wheat bread. Can be made as a wrap in a whole wheat tortilla. Served with kettle potato chips or corn tortilla chips.', price='9.0 USD', category='Sandwiches', collection=None)]\n"
532535
]
533536
}
534537
],
@@ -548,7 +551,7 @@
548551
"name": "stdout",
549552
"output_type": "stream",
550553
"text": [
551-
"We offer several vegan options, including the Beyond Burger, Tofu Salad Sandwich, and Boca Chik'n Sandwich. All of these sandwiches come with Romaine lettuce, tomato, and vegan mayonnaise, and can be made as a wrap in a whole wheat tortilla. They are all priced at $9.0 USD and served with kettle potato chips or corn tortilla chips.\n"
554+
"We have a couple of delicious vegan options for you! Our Beyond Burger is made with plant-based ingredients and served with lettuce, tomato, pickle, vegan mayo, ketchup, and mustard on a toasted bun. We also have a Tofu Salad Sandwich with lettuce, tomato, vegan mayo, and mustard. Both sandwiches can be made as wraps and come with kettle potato chips or corn tortilla chips. They are priced at $9. Enjoy your vegan meal!\n"
552555
]
553556
}
554557
],
@@ -592,8 +595,8 @@
592595
"name": "stdout",
593596
"output_type": "stream",
594597
"text": [
595-
"Rephrased Question: What is the price of the first vegan option?\n",
596-
"LLM Response: The first vegan option on our menu is the Beyond Burger and it costs 9.0 USD. It comes with Romaine lettuce, tomato, pickle, vegan mayonnaise, ketchup, and mustard on a toasted bun. You can also have it as a wrap in a whole wheat tortilla. It's served with kettle potato chips or corn tortilla chips. Enjoy!\n"
598+
"Rephrased Question: What is the price of the first vegan dish?\n",
599+
"LLM Response: The price of the first vegan dish, Veggie Samosa, is 8.35 USD. Enjoy these triangular pastries filled with spiced potatoes, peas, and lentils, served with a side of mint or tamarind relish!\n"
597600
]
598601
}
599602
],
@@ -674,7 +677,7 @@
674677
],
675678
"metadata": {
676679
"kernelspec": {
677-
"display_name": "Python 3 (ipykernel)",
680+
"display_name": ".venv",
678681
"language": "python",
679682
"name": "python3"
680683
},

src/requirements.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ aiofiles==24.1.0
88
# via quart
99
aiohappyeyeballs==2.4.3
1010
# via aiohttp
11-
aiohttp==3.10.8
11+
aiohttp==3.10.10
1212
# via
1313
# langchain
1414
# langchain-community
1515
aiosignal==1.3.1
1616
# via aiohttp
1717
annotated-types==0.7.0
1818
# via pydantic
19-
anyio==4.6.0
19+
anyio==4.6.2.post1
2020
# via
2121
# httpx
2222
# openai
@@ -31,7 +31,7 @@ certifi==2024.8.30
3131
# httpcore
3232
# httpx
3333
# requests
34-
charset-normalizer==3.3.2
34+
charset-normalizer==3.4.0
3535
# via requests
3636
click==8.1.7
3737
# via
@@ -41,15 +41,15 @@ dataclasses-json==0.6.7
4141
# via langchain-community
4242
distro==1.9.0
4343
# via openai
44-
dnspython==2.6.1
44+
dnspython==2.7.0
4545
# via pymongo
4646
flask==3.0.3
4747
# via quart
48-
frozenlist==1.4.1
48+
frozenlist==1.5.0
4949
# via
5050
# aiohttp
5151
# aiosignal
52-
greenlet==3.1.1
52+
greenlet==3.0.3
5353
# via sqlalchemy
5454
h11==0.14.0
5555
# via
@@ -60,7 +60,7 @@ h2==4.1.0
6060
# via hypercorn
6161
hpack==4.0.0
6262
# via h2
63-
httpcore==1.0.5
63+
httpcore==1.0.6
6464
# via httpx
6565
httpx==0.27.2
6666
# via
@@ -72,7 +72,7 @@ hypercorn==0.17.3
7272
# quartapp (src/pyproject.toml)
7373
hyperframe==6.0.1
7474
# via h2
75-
idna==3.9
75+
idna==3.10
7676
# via
7777
# anyio
7878
# httpx
@@ -86,39 +86,39 @@ jinja2==3.1.4
8686
# via
8787
# flask
8888
# quart
89-
jiter==0.5.0
89+
jiter==0.6.1
9090
# via openai
9191
jsonpatch==1.33
9292
# via langchain-core
9393
jsonpointer==3.0.0
9494
# via jsonpatch
95-
langchain==0.3.1
95+
langchain==0.3.4
9696
# via
9797
# langchain-community
9898
# quartapp (src/pyproject.toml)
99-
langchain-community==0.3.1
99+
langchain-community==0.3.3
100100
# via quartapp (src/pyproject.toml)
101-
langchain-core==0.3.6
101+
langchain-core==0.3.13
102102
# via
103103
# langchain
104104
# langchain-community
105105
# langchain-openai
106106
# langchain-text-splitters
107-
langchain-openai==0.2.1
107+
langchain-openai==0.2.3
108108
# via quartapp (src/pyproject.toml)
109109
langchain-text-splitters==0.3.0
110110
# via langchain
111-
langsmith==0.1.129
111+
langsmith==0.1.137
112112
# via
113113
# langchain
114114
# langchain-community
115115
# langchain-core
116-
markupsafe==2.1.5
116+
markupsafe==3.0.2
117117
# via
118118
# jinja2
119119
# quart
120120
# werkzeug
121-
marshmallow==3.22.0
121+
marshmallow==3.23.0
122122
# via dataclasses-json
123123
multidict==6.1.0
124124
# via
@@ -130,9 +130,9 @@ numpy==1.26.4
130130
# via
131131
# langchain
132132
# langchain-community
133-
openai==1.50.2
133+
openai==1.52.2
134134
# via langchain-openai
135-
orjson==3.10.7
135+
orjson==3.10.10
136136
# via langsmith
137137
packaging==24.1
138138
# via
@@ -151,7 +151,7 @@ pydantic-core==2.23.4
151151
# via pydantic
152152
pydantic-settings==2.5.2
153153
# via langchain-community
154-
pymongo==4.9.1
154+
pymongo==4.10.1
155155
# via quartapp (src/pyproject.toml)
156156
python-dotenv==1.0.1
157157
# via
@@ -162,7 +162,7 @@ pyyaml==6.0.2
162162
# langchain
163163
# langchain-community
164164
# langchain-core
165-
quart==0.19.6
165+
quart==0.19.8
166166
# via quartapp (src/pyproject.toml)
167167
regex==2024.9.11
168168
# via tiktoken
@@ -177,7 +177,7 @@ sniffio==1.3.1
177177
# anyio
178178
# httpx
179179
# openai
180-
sqlalchemy==2.0.35
180+
sqlalchemy==2.0.36
181181
# via
182182
# langchain
183183
# langchain-community
@@ -186,7 +186,7 @@ tenacity==8.5.0
186186
# langchain
187187
# langchain-community
188188
# langchain-core
189-
tiktoken==0.7.0
189+
tiktoken==0.8.0
190190
# via langchain-openai
191191
tqdm==4.66.5
192192
# via openai
@@ -202,11 +202,11 @@ typing-inspect==0.9.0
202202
# via dataclasses-json
203203
urllib3==2.2.3
204204
# via requests
205-
werkzeug==3.0.4
205+
werkzeug==3.0.6
206206
# via
207207
# flask
208208
# quart
209209
wsproto==1.2.0
210210
# via hypercorn
211-
yarl==1.13.1
211+
yarl==1.16.0
212212
# via aiohttp

0 commit comments

Comments
 (0)