import requests
import json
url = "https://api.gitcode.com/api/v5/similarity/"
headers = {
"Authorization": "Bearer {os.environ['ACCESS_TOKEN']}",
"Content-Type": "application/json"
}
payload = json.dumps({
"model": "bge-m3",
"inputs": {
"source_sentence": "That is a happy person",
"sentences": [
"That is a happy dog",
"That is a very happy person"
]
}
})
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)