MCPcopy Create free account
hub / github.com/alibaba/zvec / __init__

Method __init__

python/zvec/extension/http_embedding_function.py:84–95  ·  view source on GitHub ↗
(
        self,
        base_url: str = "http://localhost:1234",
        model: str = "text-embedding-nomic-embed-text-v1.5@f16",
        api_key: Optional[str] = None,
        timeout: int = 30,
    )

Source from the content-addressed store, hash-verified

82 ENDPOINT = "/v1/embeddings"
83
84 def __init__(
85 self,
86 base_url: str = "http://localhost:1234",
87 model: str = "text-embedding-nomic-embed-text-v1.5@f16",
88 api_key: Optional[str] = None,
89 timeout: int = 30,
90 ) -> None:
91 self._base_url = base_url.rstrip("/")
92 self._model = model
93 self._api_key = api_key or os.environ.get("OPENAI_API_KEY", "")
94 self._timeout = timeout
95 self._dimension: Optional[int] = None
96
97 @property
98 def dimension(self) -> int:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected