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
Close
Hashes for mars_text_embedding_sdk_python-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88ab30a4724083b0b01ea01efcacb5abeefe7d913b34411b685ea14937c1ff0d |
|
MD5 | af7681c34a7d7c5d130288bab4765b9f |
|
BLAKE2b-256 | 55db34ade9c3ca0bd648b6f1079679d83f632416ef541d1f711cf67881df5bac |
Close
Hashes for mars_text_embedding_sdk_python-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10f84d6631a3c8bc918fe6a007649932cdb1f8e9778b58d1c1ed0e273ac9146f |
|
MD5 | 5b35265e885e46c750301e65fa75f61c |
|
BLAKE2b-256 | fde62dc288ea4a7d3d02592a6686382997704006a140959d9b8c4caa094530f9 |