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

This commit is contained in:
ccurme 2024-12-05 12:00:27 -05:00 committed by GitHub
parent d26555c682
commit b8e861a63b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}