Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mars_text_embedding_sdk_python-0.2.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file mars_text_embedding_sdk_python-0.2.0.tar.gz.

File metadata

File hashes

Hashes for mars_text_embedding_sdk_python-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b8540eb3d33d76256c92682f48a6b0ca45d41870cfd1ebd35faf021626bfa243
MD5 a85d352abd84762f73ad981290e7bead
BLAKE2b-256 c30406161e5d91a528d77a97dbc84215ec91a7a11a26d350874cbd4d21fdf0c8

See more details on using hashes here.

File details

Details for the file mars_text_embedding_sdk_python-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mars_text_embedding_sdk_python-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d85c8240f03f5208b3394d1a856a209de69d7ce5ab3e02f2149251ef6cc78653
MD5 a94839101a35920d7ff83d535b2ca11a
BLAKE2b-256 7ad3bdd82ba01d3c117a34c2830c8494913c7fb8f9de2446b676a23c6424cdd0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page