create custom models #5628
naokityokoyama
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how to create a custom model from this code
prompt = 'question '
url = "endpoint api"
payload = json.dumps({
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": prompt
}
],
"temperature": 0.0
})
headers = {
'Content-Type': 'application/json',
'Content-Type': 'application/json',
'X-Requester-Token': token
}
response = requests.request("POST", url, headers=headers, data=payload)
result = response.text
print (result)
Beta Was this translation helpful? Give feedback.
All reactions