File size: 389 Bytes
9db1d1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import requests
import json

url = "https://harvesthealth-gemma-inference.hf.space/v1/chat/completions"

payload = {
    "model": "google/gemma-2b-it",
    "messages": [
        {"role": "user", "content": "Hello, how are you?"}
    ]
}

headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, headers=headers, data=json.dumps(payload))

print(response.json())