Skip to content

Commit 7a36d6b

Browse files
authored
chore(docs): bump langgraph in docs & reformat all docs (#32044)
Trying to unblock documentation build pipeline * Bump langgraph dep in docs * Update langgraph in lock file (resolves an issue in API reference generation)
1 parent 3b9dd1e commit 7a36d6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3281
-3190
lines changed

cookbook/cql_agent.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@
229229
" \"smoke\",\n",
230230
" \"temp\",\n",
231231
"]\n",
232-
"assert all(\n",
233-
" [column in df.columns for column in expected_columns]\n",
234-
"), \"DataFrame does not have the expected columns\""
232+
"assert all([column in df.columns for column in expected_columns]), (\n",
233+
" \"DataFrame does not have the expected columns\"\n",
234+
")"
235235
]
236236
},
237237
{

cookbook/generative_agents_interactive_simulacra_of_human_behavior.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@
487487
" print(\"*\" * 40)\n",
488488
" print(\n",
489489
" colored(\n",
490-
" f\"After {i+1} observations, Tommie's summary is:\\n{tommie.get_summary(force_refresh=True)}\",\n",
490+
" f\"After {i + 1} observations, Tommie's summary is:\\n{tommie.get_summary(force_refresh=True)}\",\n",
491491
" \"blue\",\n",
492492
" )\n",
493493
" )\n",

cookbook/img-to_img-search_CLIP_ChromaDB.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389
" ax = axs[idx]\n",
390390
" ax.imshow(img)\n",
391391
" # Assuming similarity is not available in the new data, removed sim_score\n",
392-
" ax.title.set_text(f\"\\nProduct ID: {data[\"id\"]}\\n Score: {score}\")\n",
392+
" ax.title.set_text(f\"\\nProduct ID: {data['id']}\\n Score: {score}\")\n",
393393
" ax.axis(\"off\") # Turn off axis\n",
394394
"\n",
395395
" # Hide any remaining empty subplots\n",

cookbook/meta_prompt.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@
148148
"\n",
149149
" instructions = \"None\"\n",
150150
" for i in range(max_meta_iters):\n",
151-
" print(f\"[Episode {i+1}/{max_meta_iters}]\")\n",
151+
" print(f\"[Episode {i + 1}/{max_meta_iters}]\")\n",
152152
" chain = initialize_chain(instructions, memory=None)\n",
153153
" output = chain.predict(human_input=task)\n",
154154
" for j in range(max_iters):\n",
155-
" print(f\"(Step {j+1}/{max_iters})\")\n",
155+
" print(f\"(Step {j + 1}/{max_iters})\")\n",
156156
" print(f\"Assistant: {output}\")\n",
157157
" print(\"Human: \")\n",
158158
" human_input = input()\n",

cookbook/multi_player_dnd.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
"outputs": [],
184184
"source": [
185185
"game_description = f\"\"\"Here is the topic for a Dungeons & Dragons game: {quest}.\n",
186-
" The characters are: {*character_names,}.\n",
186+
" The characters are: {(*character_names,)}.\n",
187187
" The story is narrated by the storyteller, {storyteller_name}.\"\"\"\n",
188188
"\n",
189189
"player_descriptor_system_message = SystemMessage(\n",
@@ -334,7 +334,7 @@
334334
" You are the storyteller, {storyteller_name}.\n",
335335
" Please make the quest more specific. Be creative and imaginative.\n",
336336
" Please reply with the specified quest in {word_limit} words or less. \n",
337-
" Speak directly to the characters: {*character_names,}.\n",
337+
" Speak directly to the characters: {(*character_names,)}.\n",
338338
" Do not add anything else.\"\"\"\n",
339339
" ),\n",
340340
"]\n",

cookbook/multiagent_bidding.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"outputs": [],
201201
"source": [
202202
"game_description = f\"\"\"Here is the topic for the presidential debate: {topic}.\n",
203-
"The presidential candidates are: {', '.join(character_names)}.\"\"\"\n",
203+
"The presidential candidates are: {\", \".join(character_names)}.\"\"\"\n",
204204
"\n",
205205
"player_descriptor_system_message = SystemMessage(\n",
206206
" content=\"You can add detail to the description of each presidential candidate.\"\n",
@@ -595,7 +595,7 @@
595595
" Frame the debate topic as a problem to be solved.\n",
596596
" Be creative and imaginative.\n",
597597
" Please reply with the specified topic in {word_limit} words or less. \n",
598-
" Speak directly to the presidential candidates: {*character_names,}.\n",
598+
" Speak directly to the presidential candidates: {(*character_names,)}.\n",
599599
" Do not add anything else.\"\"\"\n",
600600
" ),\n",
601601
"]\n",

cookbook/openai_functions_retrieval_qa.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@
395395
"prompt_messages = [\n",
396396
" SystemMessage(\n",
397397
" content=(\n",
398-
" \"You are a world class algorithm to answer \"\n",
399-
" \"questions in a specific format.\"\n",
398+
" \"You are a world class algorithm to answer questions in a specific format.\"\n",
400399
" )\n",
401400
" ),\n",
402401
" HumanMessage(content=\"Answer question using the following context\"),\n",

cookbook/two_agent_debate_tools.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
"outputs": [],
228228
"source": [
229229
"conversation_description = f\"\"\"Here is the topic of conversation: {topic}\n",
230-
"The participants are: {', '.join(names.keys())}\"\"\"\n",
230+
"The participants are: {\", \".join(names.keys())}\"\"\"\n",
231231
"\n",
232232
"agent_descriptor_system_message = SystemMessage(\n",
233233
" content=\"You can add detail to the description of the conversation participant.\"\n",
@@ -396,7 +396,7 @@
396396
" You are the moderator.\n",
397397
" Please make the topic more specific.\n",
398398
" Please reply with the specified quest in {word_limit} words or less. \n",
399-
" Speak directly to the participants: {*names,}.\n",
399+
" Speak directly to the participants: {(*names,)}.\n",
400400
" Do not add anything else.\"\"\"\n",
401401
" ),\n",
402402
"]\n",

docs/api_reference/_extensions/gallery_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def run(self) -> List[nodes.Node]:
108108

109109
# Parse the template with Sphinx Design to create an output container
110110
# Prep the options for the template grid
111-
class_ = "gallery-directive" + f' {self.options.get("class-container", "")}'
111+
class_ = "gallery-directive" + f" {self.options.get('class-container', '')}"
112112
options = {"gutter": 2, "class-container": class_}
113113
options_str = "\n".join(f":{k}: {v}" for k, v in options.items())
114114

docs/api_reference/create_api_rst.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def _construct_doc(
267267
.. _{package_namespace}:
268268
269269
======================================
270-
{package_namespace.replace('_', '-')}: {package_version}
270+
{package_namespace.replace("_", "-")}: {package_version}
271271
======================================
272272
273273
.. automodule:: {package_namespace}
@@ -325,7 +325,7 @@ def _construct_doc(
325325

326326
index_autosummary += f"""
327327
:ref:`{package_namespace}_{module}`
328-
{'^' * (len(package_namespace) + len(module) + 8)}
328+
{"^" * (len(package_namespace) + len(module) + 8)}
329329
"""
330330

331331
if classes:
@@ -364,7 +364,7 @@ def _construct_doc(
364364
365365
"""
366366
index_autosummary += f"""
367-
{class_['qualified_name']}
367+
{class_["qualified_name"]}
368368
"""
369369

370370
if functions:
@@ -427,7 +427,7 @@ def _construct_doc(
427427
428428
"""
429429
index_autosummary += f"""
430-
{class_['qualified_name']}
430+
{class_["qualified_name"]}
431431
"""
432432

433433
if deprecated_functions:

0 commit comments

Comments
 (0)