[AUR-389] Add base interface and embedding model (#17)
This change provides the base interface of an embedding, and wrap the Langchain's OpenAI embedding. Usage as follow:
```python
from kotaemon.embeddings import AzureOpenAIEmbeddings
model = AzureOpenAIEmbeddings(
model="text-embedding-ada-002",
deployment="embedding-deployment",
openai_api_base="https://test.openai.azure.com/",
openai_api_key="some-key",
)
output = model("Hello world")
```
This commit is contained in:
committed by
GitHub
parent
1061192731
commit
c339912312
1552
tests/resources/embedding_openai.json
Normal file
1552
tests/resources/embedding_openai.json
Normal file
File diff suppressed because it is too large
Load Diff
3094
tests/resources/embedding_openai_batch.json
Normal file
3094
tests/resources/embedding_openai_batch.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user