Add jina-embeddings-v2-base-de model configuration (#2094)

This commit is contained in:
Joshua 2024-01-19 18:11:55 +08:00 committed by GitHub
parent f3323beaca
commit 09a8db10d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,9 @@
model: jina-embeddings-v2-base-de
model_type: text-embedding
model_properties:
context_size: 8192
max_chunks: 2048
pricing:
input: '0.001'
unit: '0.001'
currency: USD

View File

@ -17,7 +17,7 @@ class JinaTextEmbeddingModel(TextEmbeddingModel):
Model class for Jina text embedding model.
"""
api_base: str = 'https://api.jina.ai/v1/embeddings'
models: list[str] = ['jina-embeddings-v2-base-en', 'jina-embeddings-v2-small-en', 'jina-embeddings-v2-base-zh']
models: list[str] = ['jina-embeddings-v2-base-en', 'jina-embeddings-v2-small-en', 'jina-embeddings-v2-base-zh', 'jina-embeddings-v2-base-de']
def _invoke(self, model: str, credentials: dict,
texts: list[str], user: Optional[str] = None) \