✌️モデルの統合方法

1
3
APIにリクエストを送信
Pythonを使用した例:
import requests
url = "https://api.gptcloud.com/aiam/v1/chat/completions"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer pR2vV0zGZ0nP6tQ3gFJk9wXn0"
}
payload = {
"model": "62d8b2e6-42f9-4c17-95f8-4ca93d74f396",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Last updated
