headers = {
"Content-Type": "application/json",
}
data = {
"prompt": [
{"role": "system", "content": ""},
# just try to limit the characters
{"role": "user", "content": "who are you? I am trying to connect to you"},
],
"n_predict": 512,
"temperature": 0.3,
"top_k": 40,
"top_p": 0.90,
"stopped_eos": True,
"repeat_penalty": 1.05,
"stop": [
"assistant",
"<|im_end|>",
],
"seed": 42,
}
headers = {
"Content-Type": "application/json",
'Authorization': 'Bearer ' + RUNPOD_API_KEY,
}
BASE_URL = 'https://id.api.runpod.ai/completion'
response = requests.post(
f"{BASE_URL}",
headers=headers,
json=data,
timeout=3000,
)
headers = {
"Content-Type": "application/json",
}
data = {
"prompt": [
{"role": "system", "content": ""},
# just try to limit the characters
{"role": "user", "content": "who are you? I am trying to connect to you"},
],
"n_predict": 512,
"temperature": 0.3,
"top_k": 40,
"top_p": 0.90,
"stopped_eos": True,
"repeat_penalty": 1.05,
"stop": [
"assistant",
"<|im_end|>",
],
"seed": 42,
}
headers = {
"Content-Type": "application/json",
'Authorization': 'Bearer ' + RUNPOD_API_KEY,
}
BASE_URL = 'https://id.api.runpod.ai/completion'
response = requests.post(
f"{BASE_URL}",
headers=headers,
json=data,
timeout=3000,
)