NovitaEmbedding (embedding/novita_embedding.py)

deep-searcher · deepsearcher/embedding/novita_embedding.py · python · Apache-2.0
ai, AI / Agents

Python client for Novita AI embeddings with batching and dimension support.

# Source: https://github.com/zilliztech/deep-searcher | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
import os
from typing import List, Union

import requests

from deepsearcher.embedding.base import BaseEmbedding

NOVITA_MODEL_DIM_MAP = {
    "baai/bge-m3": 1024,
}

NOVITA_EMBEDDING_API = "https://api.novita.ai/v3/openai/embeddings"


class NovitaEmbedding(BaseEmbedding):
    """
    Novita AI embedding model implementation.

    This class provides an interface to the Novita AI embedding API, which offers
    various embedding models for text processing.

    For more information, see:
    https://novita.ai/docs/api-reference/model-apis-llm-create-embeddings
    """

    def __i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key