The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: integration asyncio mode (#28306)
Erick Friisa3296479a0d9
diff --git a/docs/docs/contributing/how_to/integrations/package.mdx b/docs/docs/contributing/how_to/integrations/package.mdxindex 0480ffbd54..8189ce97f8 100644--- a/docs/docs/contributing/how_to/integrations/package.mdx+++ b/docs/docs/contributing/how_to/integrations/package.mdx@@ -52,7 +52,7 @@ We recommended pinning these to the latest version: <img src="https://img.shieldNote: Replace `<latest_version>` with the latest version of `langchain-tests` below.```bash-poetry add --group test pytest pytest-socket langchain-tests==<latest_version>+poetry add --group test pytest pytest-socket pytest-asyncio langchain-tests==<latest_version>```And finally, have poetry set up a virtual environment with your dependencies, as welldiff --git a/docs/docs/contributing/how_to/integrations/standard_tests.ipynb b/docs/docs/contributing/how_to/integrations/standard_tests.ipynbindex 3f4410516a..c8c8baf446 100644--- a/docs/docs/contributing/how_to/integrations/standard_tests.ipynb+++ b/docs/docs/contributing/how_to/integrations/standard_tests.ipynb@@ -1,13 +1,23 @@{"cells": [{- "cell_type": "markdown",- "metadata": {},+ "cell_type": "raw",+ "metadata": {+ "vscode": {+ "languageId": "raw"+ }+ },"source": ["---\n","pagination_next: contributing/how_to/integrations/publish\n","pagination_prev: contributing/how_to/integrations/package\n",- "---\n",+ "---"+ ]+ },+ {+ "cell_type": "markdown",+ "metadata": {},+ "source": ["# How to add standard tests to an integration\n","\n","When creating either a custom class for yourself or to publish in a LangChain integration, it is important to add standard tests to ensure it works as expected. This guide will show you how to add standard tests to a custom chat model, and you can **[Skip to the test templates](#standard-test-templates-per-component)** for implementing tests for each integration type.\n",@@ -37,13 +47,13 @@"\n","```bash\n","poetry add langchain-core\n",- "poetry add --group test pytest pytest-socket langchain-tests==<latest_version>\n",+ "poetry add --group test pytest pytest-socket pytest-asyncio langchain-tests==<latest_version>\n","poetry install --with test\n","```\n"," </TabItem>\n"," <TabItem value=\"pip\" label=\"Pip\">\n","```bash\n",- "pip install -U langchain-core pytest pytest-socket langchain-tests\n",+ "pip install -U langchain-core pytest pytest-socket pytest-asyncio langchain-tests\n","\n","# install current package in editable mode\n","pip install --editable .\n",@@ -160,10 +170,10 @@"\n","```bash\n","# run unit tests without network access\n",- "poetry run pytest --disable-socket --allow-unix-socket tests/unit_tests\n",+ "poetry run pytest --disable-socket --allow-unix-socket --asyncio-mode=auto tests/unit_tests\n","\n","# run integration tests\n",- "poetry run pytest tests/integration_tests\n",+ "poetry run pytest --asyncio-mode=auto tests/integration_tests\n","```\n","\n"," </TabItem>\n",@@ -171,10 +181,10 @@"\n","```bash\n","# run unit tests without network access\n",- "pytest --disable-socket --allow-unix-socket tests/unit_tests\n",+ "pytest --disable-socket --allow-unix-socket --asyncio-mode=auto tests/unit_tests\n","\n","# run integration tests\n",- "pytest tests/integration_tests\n",+ "pytest --asyncio-mode=auto tests/integration_tests\n","```\n","\n"," </TabItem>\n",@@ -300,7 +310,7 @@"\n"," @property\n"," def embedding_model_params(self) -> dict:\n",- " return {\"model\": \"nest-embed-001\", \"temperature\": 0}"+ " return {\"model\": \"nest-embed-001\"}"]},{