The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: vectorstore standard tests (#28241)
Erick Friis873897326728
diff --git a/docs/docs/contributing/how_to/integrations/standard_tests.ipynb b/docs/docs/contributing/how_to/integrations/standard_tests.ipynbindex 032c077747..45739d7d5d 100644--- a/docs/docs/contributing/how_to/integrations/standard_tests.ipynb+++ b/docs/docs/contributing/how_to/integrations/standard_tests.ipynb@@ -380,6 +380,62 @@" return {\"a\": 2, \"b\": 3}"]},+ {+ "cell_type": "markdown",+ "metadata": {},+ "source": [+ "</details>\n",+ "<details>\n",+ " <summary>Vector Stores</summary>"+ ]+ },+ {+ "cell_type": "code",+ "execution_count": null,+ "metadata": {},+ "outputs": [],+ "source": [+ "# title=\"tests/integration_tests/test_vectorstores_sync.py\"\n",+ "\n",+ "from typing import AsyncGenerator, Generator\n",+ "\n",+ "import pytest\n",+ "from langchain_core.vectorstores import VectorStore\n",+ "from langchain_parrot_link.vectorstores import ParrotVectorStore\n",+ "from langchain_standard_tests.integration_tests.vectorstores import (\n",+ " AsyncReadWriteTestSuite,\n",+ " ReadWriteTestSuite,\n",+ ")\n",+ "\n",+ "\n",+ "class TestSync(ReadWriteTestSuite):\n",+ " @pytest.fixture()\n",+ " def vectorstore(self) -> Generator[VectorStore, None, None]: # type: ignore\n",+ " \"\"\"Get an empty vectorstore for unit tests.\"\"\"\n",+ " store = ParrotVectorStore()\n",+ " # note: store should be EMPTY at this point\n",+ " # if you need to delete data, you may do so here\n",+ " try:\n",+ " yield store\n",+ " finally:\n",+ " # cleanup operations, or deleting data\n",+ " pass\n",+ "\n",+ "\n",+ "class TestAsync(AsyncReadWriteTestSuite):\n",+ " @pytest.fixture()\n",+ " async def vectorstore(self) -> AsyncGenerator[VectorStore, None]: # type: ignore\n",+ " \"\"\"Get an empty vectorstore for unit tests.\"\"\"\n",+ " store = ParrotVectorStore()\n",+ " # note: store should be EMPTY at this point\n",+ " # if you need to delete data, you may do so here\n",+ " try:\n",+ " yield store\n",+ " finally:\n",+ " # cleanup operations, or deleting data\n",+ " pass"+ ]+ },{"cell_type": "markdown","metadata": {},