'commit'
This commit is contained in:
@@ -3,7 +3,7 @@ import requests
|
||||
from Config.Config import GPTNB_API_KEY
|
||||
|
||||
class ModelInteractor:
|
||||
def __init__(self, api_key=GPTNB_API_KEY, api_url="https://goapi.gptnb.ai/v1/chat/completions"):
|
||||
def __init__(self, api_key=GPTNB_API_KEY, api_url="https://goapi.gptnb.ai/v1/chat/completions"): # 修复URL
|
||||
self.api_key = api_key
|
||||
self.api_url = api_url
|
||||
self.headers = {
|
||||
@@ -45,7 +45,7 @@ class ModelInteractor:
|
||||
response = requests.post(
|
||||
self.api_url,
|
||||
headers=self.headers,
|
||||
data=json.dumps(payload),
|
||||
data=json.dumps(payload), # 确保变量名一致
|
||||
stream=True,
|
||||
timeout=30
|
||||
)
|
||||
|
Reference in New Issue
Block a user