No project description provided
Project description
Example
from mars_text_embedding_sdk_python import EmbeddingSDK, KeyValue
objects = [
[
KeyValue(key="hello", value="world"),
KeyValue(key="hello", value="world"),
KeyValue(key="you", value="are"),
],
[
KeyValue(key="you", value="are"),
KeyValue(key="cool", value="beans"),
KeyValue(key="cool", value="beans"),
]
]
sdk = EmbeddingSDK("http://localhost:4001/graphql")
emb_comp = sdk(objects, dims=300).data
arrs = emb_comp.to_arrays(lambda x: x.mean(axis=0)) # aggregate embeddings to their mean
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mars_text_embedding_sdk_python-0.2.0.tar.gz
.
File metadata
- Download URL: mars_text_embedding_sdk_python-0.2.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8540eb3d33d76256c92682f48a6b0ca45d41870cfd1ebd35faf021626bfa243 |
|
MD5 | a85d352abd84762f73ad981290e7bead |
|
BLAKE2b-256 | c30406161e5d91a528d77a97dbc84215ec91a7a11a26d350874cbd4d21fdf0c8 |
File details
Details for the file mars_text_embedding_sdk_python-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mars_text_embedding_sdk_python-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.9.18 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d85c8240f03f5208b3394d1a856a209de69d7ce5ab3e02f2149251ef6cc78653 |
|
MD5 | a94839101a35920d7ff83d535b2ca11a |
|
BLAKE2b-256 | 7ad3bdd82ba01d3c117a34c2830c8494913c7fb8f9de2446b676a23c6424cdd0 |