Skip to content

The agent engineering platform.

openai[patch]: add standard tests for embeddings (#28540)

ccurmeb8e861a63b85
diff --git a/libs/partners/openai/tests/integration_tests/embeddings/test_base_standard.py b/libs/partners/openai/tests/integration_tests/embeddings/test_base_standard.py
new file mode 100644
index 0000000000..66f74f1687
--- /dev/null
+++ b/libs/partners/openai/tests/integration_tests/embeddings/test_base_standard.py
@@ -0,0 +1,18 @@
+"""Standard LangChain interface tests"""
+
+from typing import Type
+
+from langchain_core.embeddings import Embeddings
+from langchain_tests.integration_tests.embeddings import EmbeddingsIntegrationTests
+
+from langchain_openai import OpenAIEmbeddings
+
+
+class TestOpenAIStandard(EmbeddingsIntegrationTests):
+ @property
+ def embeddings_class(self) -> Type[Embeddings]:
+ return OpenAIEmbeddings
+
+ @property
+ def embedding_model_params(self) -> dict:
+ return {"model": "text-embedding-3-small", "dimensions": 128}