mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-14 13:40:54 +00:00
feat: call xunfei spark with stream, and fix the temperature bug (#2121)
Co-authored-by: aries_ckt <916701291@qq.com>
This commit is contained in:
@@ -78,17 +78,13 @@ class Config(metaclass=Singleton):
|
||||
)
|
||||
|
||||
# xunfei spark
|
||||
self.spark_api_version = os.getenv("XUNFEI_SPARK_API_VERSION")
|
||||
self.spark_proxy_api_key = os.getenv("XUNFEI_SPARK_API_KEY")
|
||||
self.spark_proxy_api_secret = os.getenv("XUNFEI_SPARK_API_SECRET")
|
||||
self.spark_proxy_api_appid = os.getenv("XUNFEI_SPARK_APPID")
|
||||
if self.spark_proxy_api_key and self.spark_proxy_api_secret:
|
||||
os.environ["spark_proxyllm_proxy_api_key"] = self.spark_proxy_api_key
|
||||
os.environ["spark_proxyllm_proxy_api_secret"] = self.spark_proxy_api_secret
|
||||
os.environ["spark_proxyllm_proxyllm_backend"] = self.spark_api_version or ""
|
||||
os.environ["spark_proxyllm_proxy_api_app_id"] = (
|
||||
self.spark_proxy_api_appid or ""
|
||||
)
|
||||
self.spark_proxy_api_password = os.getenv("XUNFEI_SPARK_API_PASSWORD")
|
||||
self.spark_proxy_api_model = os.getenv("XUNFEI_SPARK_API_MODEL")
|
||||
if self.spark_proxy_api_model and self.spark_proxy_api_password:
|
||||
os.environ[
|
||||
"spark_proxyllm_proxy_api_password"
|
||||
] = self.spark_proxy_api_password
|
||||
os.environ["spark_proxyllm_proxy_api_model"] = self.spark_proxy_api_model
|
||||
|
||||
# baichuan proxy
|
||||
self.bc_proxy_api_key = os.getenv("BAICHUAN_PROXY_API_KEY")
|
||||
|
Reference in New Issue
Block a user