feat: add port config

This commit is contained in:
zhayujie
2026-04-09 21:29:53 +08:00
parent d86cb4ded6
commit 3cd92ccda3
2 changed files with 4 additions and 3 deletions

View File

@@ -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()

View File

@@ -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": "",