This commit is contained in:
2025-08-25 14:01:48 +08:00
parent 3dd85cd80d
commit 5e531d565b
8 changed files with 531 additions and 3 deletions

View File

@@ -1,9 +1,11 @@
import json
import requests
from Config import Config
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"): # 修复URL
def __init__(self, api_key=GPTNB_API_KEY, api_url=f"{Config.GPTNB_BASE_URL}/v1/chat/completions"): # 修复URL
self.api_key = api_key
self.api_url = api_url
self.headers = {