jina-embeddings-v3 / demo /general_curl_curlify_demo.py
sanbo
update sth. at 2025-01-16 23:44:43
e397647
raw
history blame contribute delete
447 Bytes
import requests
import curlify
def get_curl_command(input_text, url="https://sanbo1200-jina-embeddings-v3.hf.space/api/v1/embeddings"):
headers = {
"Content-Type": "application/json"
}
data = {
"input": input_text,
"model": "jinaai/jina-embeddings-v3"
}
r = requests.post(url, headers=headers, json=data)
return curlify.to_curl(r.request)
print(get_curl_command("Your text string goes here"))