mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-20 22:03:52 +00:00
openai[patch]: add standard tests for embeddings (#28540)
This commit is contained in:
parent
d26555c682
commit
b8e861a63b
@ -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}
|
Loading…
Reference in New Issue
Block a user