From c858c6cc0944c79b1e560358da4aa1a2fff07b9c Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Thu, 12 Sep 2024 21:22:48 -0700 Subject: [PATCH] docs: mdx v3 compat [wip] --- .../additional_resources/arxiv_references.mdx | 2 +- docs/docs/concepts.mdx | 4 +- docs/docs/how_to/callbacks_async.ipynb | 2 +- .../docs/how_to/callbacks_custom_events.ipynb | 10 +- docs/docs/how_to/custom_chat_model.ipynb | 4 +- docs/docs/how_to/tool_stream_events.ipynb | 2 +- .../vectorstores/mongodb_atlas.ipynb | 2 +- .../integrations/vectorstores/pgvector.ipynb | 2 +- .../vectorstores/sap_hanavector.ipynb | 2 +- docs/it.md | 110 ++++++++++++++++++ 10 files changed, 125 insertions(+), 15 deletions(-) create mode 100644 docs/it.md diff --git a/docs/docs/additional_resources/arxiv_references.mdx b/docs/docs/additional_resources/arxiv_references.mdx index bbd292c5ffa..3b05867ccd7 100644 --- a/docs/docs/additional_resources/arxiv_references.mdx +++ b/docs/docs/additional_resources/arxiv_references.mdx @@ -452,7 +452,7 @@ the effectiveness of the proposed technique, we implemented a ToT-based solver for the Sudoku Puzzle. Experimental results show that the ToT framework can significantly increase the success rate of Sudoku puzzle solving. Our implementation of the ToT-based Sudoku solver is available on GitHub: -\url{https://github.com/jieyilong/tree-of-thought-puzzle-solver}. +\url\{https://github.com/jieyilong/tree-of-thought-puzzle-solver\}. ## Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models diff --git a/docs/docs/concepts.mdx b/docs/docs/concepts.mdx index e20b1794626..12c45df5fda 100644 --- a/docs/docs/concepts.mdx +++ b/docs/docs/concepts.mdx @@ -734,10 +734,10 @@ of the object. If you're creating a custom chain or runnable, you need to remember to propagate request time callbacks to any child objects. -:::important Async in Python<=3.10 +:::important Async in Python<=3.10 Any `RunnableLambda`, a `RunnableGenerator`, or `Tool` that invokes other runnables -and is running `async` in python<=3.10, will have to propagate callbacks to child +and is running `async` in python<=3.10, will have to propagate callbacks to child objects manually. This is because LangChain cannot automatically propagate callbacks to child objects in this case. diff --git a/docs/docs/how_to/callbacks_async.ipynb b/docs/docs/how_to/callbacks_async.ipynb index 1577cff54e8..49751a38302 100644 --- a/docs/docs/how_to/callbacks_async.ipynb +++ b/docs/docs/how_to/callbacks_async.ipynb @@ -23,7 +23,7 @@ "\n", ":::{.callout-danger}\n", "\n", - "If you're on `python<=3.10`, you need to remember to propagate `config` or `callbacks` when invoking other `runnable` from within a `RunnableLambda`, `RunnableGenerator` or `@tool`. If you do not do this,\n", + "If you're on `python<=3.10`, you need to remember to propagate `config` or `callbacks` when invoking other `runnable` from within a `RunnableLambda`, `RunnableGenerator` or `@tool`. If you do not do this,\n", "the callbacks will not be propagated to the child runnables being invoked.\n", ":::" ] diff --git a/docs/docs/how_to/callbacks_custom_events.ipynb b/docs/docs/how_to/callbacks_custom_events.ipynb index 71a05914bdd..cc652fa1a9a 100644 --- a/docs/docs/how_to/callbacks_custom_events.ipynb +++ b/docs/docs/how_to/callbacks_custom_events.ipynb @@ -38,9 +38,9 @@ "\n", "\n", ":::caution COMPATIBILITY\n", - "LangChain cannot automatically propagate configuration, including callbacks necessary for astream_events(), to child runnables if you are running async code in python<=3.10. This is a common reason why you may fail to see events being emitted from custom runnables or tools.\n", + "LangChain cannot automatically propagate configuration, including callbacks necessary for astream_events(), to child runnables if you are running async code in python<=3.10. This is a common reason why you may fail to see events being emitted from custom runnables or tools.\n", "\n", - "If you are running python<=3.10, you will need to manually propagate the `RunnableConfig` object to the child runnable in async environments. For an example of how to manually propagate the config, see the implementation of the `bar` RunnableLambda below.\n", + "If you are running python<=3.10, you will need to manually propagate the `RunnableConfig` object to the child runnable in async environments. For an example of how to manually propagate the config, see the implementation of the `bar` RunnableLambda below.\n", "\n", "If you are running python>=3.11, the `RunnableConfig` will automatically propagate to child runnables in async environment. However, it is still a good idea to propagate the `RunnableConfig` manually if your code may run in other Python versions.\n", ":::" @@ -115,7 +115,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In python <= 3.10, you must propagate the config manually!" + "In python <= 3.10, you must propagate the config manually!" ] }, { @@ -147,7 +147,7 @@ "async def bar(x: str, config: RunnableConfig) -> str:\n", " \"\"\"An example that shows how to manually propagate config.\n", "\n", - " You must do this if you're running python<=3.10.\n", + " You must do this if you're running python<=t;=3.10.\n", " \"\"\"\n", " await adispatch_custom_event(\"event1\", {\"x\": x}, config=config)\n", " await adispatch_custom_event(\"event2\", 5, config=config)\n", @@ -223,7 +223,7 @@ "async def bar(x: str, config: RunnableConfig) -> str:\n", " \"\"\"An example that shows how to manually propagate config.\n", "\n", - " You must do this if you're running python<=3.10.\n", + " You must do this if you're running python<=t;=3.10.\n", " \"\"\"\n", " await adispatch_custom_event(\"event1\", {\"x\": x}, config=config)\n", " await adispatch_custom_event(\"event2\", 5, config=config)\n", diff --git a/docs/docs/how_to/custom_chat_model.ipynb b/docs/docs/how_to/custom_chat_model.ipynb index 7aaa3c94c7c..09a34b521a2 100644 --- a/docs/docs/how_to/custom_chat_model.ipynb +++ b/docs/docs/how_to/custom_chat_model.ipynb @@ -39,7 +39,7 @@ "| `AIMessageChunk` / `HumanMessageChunk` / ... | Chunk variant of each type of message. |\n", "\n", "\n", - "::: {.callout-note}\n", + ":::note\n", "`ToolMessage` and `FunctionMessage` closely follow OpenAI's `function` and `tool` roles.\n", "\n", "This is a rapidly developing field and as more models add function calling capabilities. Expect that there will be additions to this schema.\n", @@ -145,7 +145,7 @@ "| `_astream` | Use to implement async version of `_stream`. | Optional |\n", "\n", "\n", - ":::{.callout-tip}\n", + ":::tip\n", "The `_astream` implementation uses `run_in_executor` to launch the sync `_stream` in a separate thread if `_stream` is implemented, otherwise it fallsback to use `_agenerate`.\n", "\n", "You can use this trick if you want to reuse the `_stream` implementation, but if you're able to implement code that's natively async that's a better solution since that code will run with less overhead.\n", diff --git a/docs/docs/how_to/tool_stream_events.ipynb b/docs/docs/how_to/tool_stream_events.ipynb index 3cf3f1ae21d..09757751ab0 100644 --- a/docs/docs/how_to/tool_stream_events.ipynb +++ b/docs/docs/how_to/tool_stream_events.ipynb @@ -22,7 +22,7 @@ "\n", "LangChain cannot automatically propagate configuration, including callbacks necessary for `astream_events()`, to child runnables if you are running `async` code in `python<=3.10`. This is a common reason why you may fail to see events being emitted from custom runnables or tools.\n", "\n", - "If you are running python<=3.10, you will need to manually propagate the `RunnableConfig` object to the child runnable in async environments. For an example of how to manually propagate the config, see the implementation of the `bar` RunnableLambda below.\n", + "If you are running python<=3.10, you will need to manually propagate the `RunnableConfig` object to the child runnable in async environments. For an example of how to manually propagate the config, see the implementation of the `bar` RunnableLambda below.\n", "\n", "If you are running python>=3.11, the `RunnableConfig` will automatically propagate to child runnables in async environment. However, it is still a good idea to propagate the `RunnableConfig` manually if your code may run in older Python versions.\n", "\n", diff --git a/docs/docs/integrations/vectorstores/mongodb_atlas.ipynb b/docs/docs/integrations/vectorstores/mongodb_atlas.ipynb index 140dfe179ed..2b49b21fb94 100644 --- a/docs/docs/integrations/vectorstores/mongodb_atlas.ipynb +++ b/docs/docs/integrations/vectorstores/mongodb_atlas.ipynb @@ -474,7 +474,7 @@ "# Other Notes\n", ">* More documentation can be found at [LangChain-MongoDB](https://www.mongodb.com/docs/atlas/atlas-vector-search/ai-integrations/langchain/) site\n", ">* This feature is Generally Available and ready for production deployments.\n", - ">* The langchain version 0.0.305 ([release notes](https://github.com/langchain-ai/langchain/releases/tag/v0.0.305)) introduces the support for $vectorSearch MQL stage, which is available with MongoDB Atlas 6.0.11 and 7.0.2. Users utilizing earlier versions of MongoDB Atlas need to pin their LangChain version to <=0.0.304\n", + ">* The langchain version 0.0.305 ([release notes](https://github.com/langchain-ai/langchain/releases/tag/v0.0.305)) introduces the support for $vectorSearch MQL stage, which is available with MongoDB Atlas 6.0.11 and 7.0.2. Users utilizing earlier versions of MongoDB Atlas need to pin their LangChain version to <=0.0.304\n", "> " ] }, diff --git a/docs/docs/integrations/vectorstores/pgvector.ipynb b/docs/docs/integrations/vectorstores/pgvector.ipynb index ebfa261edc5..5f544485b36 100644 --- a/docs/docs/integrations/vectorstores/pgvector.ipynb +++ b/docs/docs/integrations/vectorstores/pgvector.ipynb @@ -255,7 +255,7 @@ "| \\$eq | Equality (==) |\n", "| \\$ne | Inequality (!=) |\n", "| \\$lt | Less than (<) |\n", - "| \\$lte | Less than or equal (<=) |\n", + "| \\$lte | Less than or equal (<=) |\n", "| \\$gt | Greater than (>) |\n", "| \\$gte | Greater than or equal (>=) |\n", "| \\$in | Special Cased (in) |\n", diff --git a/docs/docs/integrations/vectorstores/sap_hanavector.ipynb b/docs/docs/integrations/vectorstores/sap_hanavector.ipynb index 1e8dc1b5529..b8797616ae4 100644 --- a/docs/docs/integrations/vectorstores/sap_hanavector.ipynb +++ b/docs/docs/integrations/vectorstores/sap_hanavector.ipynb @@ -372,7 +372,7 @@ "| `$eq` | Equality (==) |\n", "| `$ne` | Inequality (!=) |\n", "| `$lt` | Less than (<) |\n", - "| `$lte` | Less than or equal (<=) |\n", + "| `$lte` | Less than or equal (<=) |\n", "| `$gt` | Greater than (>) |\n", "| `$gte` | Greater than or equal (>=) |\n", "| `$in` | Contained in a set of given values (in) |\n", diff --git a/docs/it.md b/docs/it.md new file mode 100644 index 00000000000..9b47e34a39d --- /dev/null +++ b/docs/it.md @@ -0,0 +1,110 @@ +[ERROR] 36/1326 MDX files couldn't compile! +--- +Error while compiling file docs/additional_resources/arxiv_references.mdx:455:11 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/how_to/custom_chat_model.md:38:6 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/how_to/extraction_parse.md:88:9 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/how_to/parallel.md:75:6 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/how_to/self_query.md:254:2 +Details: Unexpected character `<` (U+003C) before name, expected a character that can start a name, such as a letter, `$`, or `_` +--- +Error while compiling file docs/how_to/sql_csv.md +Details: These MDX global variables do not seem to be available in scope: df +--- +Error while compiling file docs/how_to/streaming.md:428:90 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/how_to/structured_output.md:510:15 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/chat/anthropic_functions.md:7:6 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/document_loaders/blockchain.md:27:21 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/document_loaders/confluence.md:19:1 +Details: Expected a closing tag for `` (19:149-19:158) before the end of `paragraph` +--- +Error while compiling file docs/integrations/document_loaders/figma.md +Details: These MDX global variables do not seem to be available in scope: node_id +--- +Error while compiling file docs/integrations/document_loaders/mintbase.md:27:21 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/document_loaders/mongodb.md:23:23 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/document_loaders/rspace.md:20:5 +Details: Expected a closing tag for `` (20:20-20:30) before the end of `paragraph` +--- +Error while compiling file docs/integrations/document_loaders/slack.md +Details: These MDX global variables do not seem to be available in scope: your_slack_domain +--- +Error while compiling file docs/integrations/document_loaders/web_base.md:54:35 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/llms/runhouse.md:151:109 +Details: Unexpected character `2` (U+0032) before name, expected a character that can start a name, such as a letter, `$`, or `_` +--- +Error while compiling file docs/integrations/providers/dspy.md +Details: These MDX global variables do not seem to be available in scope: context question +--- +Error while compiling file docs/integrations/providers/figma.mdx +Details: These MDX global variables do not seem to be available in scope: node_id +--- +Error while compiling file docs/integrations/providers/xinference.mdx +Details: These MDX global variables do not seem to be available in scope: supervisor_host +--- +Error while compiling file docs/integrations/tools/amadeus.md:146:11 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/tools/azure_ai_services.md:102:11 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/tools/azure_cognitive_services.md:102:11 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/tools/bash.md:68:11 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/tools/eleven_labs_tts.md:87:11 +Details: Could not parse expression with acorn +--- +Error while compiling file /docs/docs/integrations/tools/github.md +Details: These MDX global variables do not seem to be available in scope: name repo username +--- +Error while compiling file docs/integrations/tools/gitlab.md +Details: These MDX global variables do not seem to be available in scope: name repo username +--- +Error while compiling file docs/integrations/tools/ifttt.md +Details: These MDX global variables do not seem to be available in scope: JsonPayload +--- +Error while compiling file docs/integrations/tools/lemonai.md:65:138 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/tools/playwright.md:174:11 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/vectorstores/activeloop_deeplake.md:305:122 +Details: Could not parse expression with acorn +--- +Error while compiling file docs/integrations/vectorstores/alibabacloud_opensearch.md:190:87 +Details: Unexpected character `@` (U+0040) in member name, expected a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag (note: to create a link in MDX, use `[text](url)`) +--- +Error while compiling file docs/integrations/vectorstores/baiducloud_vector_search.md:79:38 +Details: Unexpected character `@` (U+0040) in name, expected a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag (note: to create a link in MDX, use `[text](url)`) +--- +Error while compiling file docs/integrations/vectorstores/pgvector.md:155:27 +Details: Unexpected character `)` (U+0029) before name, expected a character that can start a name, such as a letter, `$`, or `_` +--- +Error while compiling file docs/integrations/vectorstores/sap_hanavector.md:199:26 +Details: Unexpected character `)` (U+0029) before name, expected a character that can start a name, such as a letter, `$`, or `_` +--- \ No newline at end of file