mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
feat: add port config
This commit is contained in:
@@ -47,8 +47,8 @@ CREDENTIAL_MAP = {
|
|||||||
|
|
||||||
|
|
||||||
class CloudClient(LinkAIClient):
|
class CloudClient(LinkAIClient):
|
||||||
def __init__(self, api_key: str, channel, host: str = ""):
|
def __init__(self, api_key: str, channel, host: str = "", port=None):
|
||||||
super().__init__(api_key, host)
|
super().__init__(api_key, host, port=port)
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
self.client_type = channel.channel_type
|
self.client_type = channel.channel_type
|
||||||
self.channel_mgr = None
|
self.channel_mgr = None
|
||||||
@@ -733,7 +733,7 @@ def start(channel, channel_mgr=None):
|
|||||||
return
|
return
|
||||||
|
|
||||||
global chat_client
|
global chat_client
|
||||||
chat_client = CloudClient(api_key=conf().get("linkai_api_key"), host=conf().get("cloud_host", ""), channel=channel)
|
chat_client = CloudClient(api_key=conf().get("linkai_api_key"), host=conf().get("cloud_host", ""), port=conf().get("cloud_port"), channel=channel)
|
||||||
chat_client.channel_mgr = channel_mgr
|
chat_client.channel_mgr = channel_mgr
|
||||||
chat_client.config = _build_config()
|
chat_client.config = _build_config()
|
||||||
chat_client.start()
|
chat_client.start()
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ available_setting = {
|
|||||||
"linkai_app_code": "",
|
"linkai_app_code": "",
|
||||||
"linkai_api_base": "https://api.link-ai.tech", # linkAI服务地址
|
"linkai_api_base": "https://api.link-ai.tech", # linkAI服务地址
|
||||||
"cloud_host": "client.link-ai.tech",
|
"cloud_host": "client.link-ai.tech",
|
||||||
|
"cloud_port": None,
|
||||||
"cloud_deployment_id": "",
|
"cloud_deployment_id": "",
|
||||||
"minimax_api_key": "",
|
"minimax_api_key": "",
|
||||||
"Minimax_group_id": "",
|
"Minimax_group_id": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user