From 7c9d376ce17fb50ea49fe817010ba72e3cef80e1 Mon Sep 17 00:00:00 2001 From: BBIT-Kai <2911862937@qq.com> Date: Fri, 22 Aug 2025 10:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=89=80=E6=9C=89IP=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E4=B8=BA=E5=9F=9F=E5=90=8D=EF=BC=8C=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E6=97=A5=E5=90=8E=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktor/src/main/kotlin/ink/snowflake/server/Application.kt | 4 ++-- ktor/src/main/kotlin/ink/snowflake/server/controller/AI.kt | 3 ++- .../kotlin/ink/snowflake/server/controller/RemoteDebug.kt | 2 +- vue/apps/web-antd/.env.production | 2 +- vue/apps/web-antd/src/router/routes/modules/ai.ts | 2 +- vue/apps/web-antd/src/views/remote/index.vue | 5 +---- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ktor/src/main/kotlin/ink/snowflake/server/Application.kt b/ktor/src/main/kotlin/ink/snowflake/server/Application.kt index 84c3167..54fe914 100644 --- a/ktor/src/main/kotlin/ink/snowflake/server/Application.kt +++ b/ktor/src/main/kotlin/ink/snowflake/server/Application.kt @@ -28,12 +28,12 @@ const val VIDEO_INPUT_PATH = "C:/tmp/" * 服务器地址 * ADB 秦朗FRP地址 */ -const val SERVER_PATH_FRP = "171.212.101.201" +const val SERVER_PATH_FRP = "s3.ronsunny.cn" // 171.212.101.201 /** * 服务器地址 * OSS 对象存储服务器地址 */ -const val SERVER_PATH_OSS = "171.212.101.199" +const val SERVER_PATH_OSS = "s1.ronsunny.cn" // 171.212.101.199 val gson = Gson() diff --git a/ktor/src/main/kotlin/ink/snowflake/server/controller/AI.kt b/ktor/src/main/kotlin/ink/snowflake/server/controller/AI.kt index 1e35c85..94b8637 100644 --- a/ktor/src/main/kotlin/ink/snowflake/server/controller/AI.kt +++ b/ktor/src/main/kotlin/ink/snowflake/server/controller/AI.kt @@ -5,6 +5,7 @@ import ai.koog.prompt.executor.llms.all.simpleOllamaAIExecutor import ai.koog.prompt.llm.LLMCapability import ai.koog.prompt.llm.LLMProvider import ai.koog.prompt.llm.LLModel +import ink.snowflake.server.SERVER_PATH_OSS import ink.snowflake.server.model.response.BaseResponse import io.ktor.server.application.Application import io.ktor.server.response.respond @@ -15,7 +16,7 @@ import io.ktor.server.routing.routing fun Application.AI() { val agent = AIAgent( - executor = simpleOllamaAIExecutor("http://171.212.101.199:13011/"), + executor = simpleOllamaAIExecutor("http://${SERVER_PATH_OSS}:13011/"), systemPrompt = "You are a helpful assistant. Answer user questions concisely.", //系统提示词 llmModel = LLModel( provider = LLMProvider.Ollama, diff --git a/ktor/src/main/kotlin/ink/snowflake/server/controller/RemoteDebug.kt b/ktor/src/main/kotlin/ink/snowflake/server/controller/RemoteDebug.kt index a1f1112..9ad8b56 100644 --- a/ktor/src/main/kotlin/ink/snowflake/server/controller/RemoteDebug.kt +++ b/ktor/src/main/kotlin/ink/snowflake/server/controller/RemoteDebug.kt @@ -77,7 +77,7 @@ fun Application.RemoteDebug() { get("/refreshDeviceList") { try { val name = call.parameters["name"] - val response: HttpResponse = client.get("http://171.212.101.201:65534/api/proxy/tcp") + val response: HttpResponse = client.get("http://${SERVER_PATH_FRP}:65534/api/proxy/tcp") val responseBody: String = response.bodyAsText() val devicesInfoRequest: DevicesInfoRequest = Gson().fromJson(responseBody, DevicesInfoRequest::class.java) val onlineDevices = devicesInfoRequest.proxies.stream() diff --git a/vue/apps/web-antd/.env.production b/vue/apps/web-antd/.env.production index eb3f787..8a4dd2f 100644 --- a/vue/apps/web-antd/.env.production +++ b/vue/apps/web-antd/.env.production @@ -1,7 +1,7 @@ VITE_BASE=/ # 接口地址 -VITE_GLOB_API_URL=http://171.212.101.199:8089/api +VITE_GLOB_API_URL=http://s1.ronsunny.cn:8089/api # 是否开启压缩,可以设置为 none, brotli, gzip VITE_COMPRESS=none diff --git a/vue/apps/web-antd/src/router/routes/modules/ai.ts b/vue/apps/web-antd/src/router/routes/modules/ai.ts index 9209ca0..2086913 100644 --- a/vue/apps/web-antd/src/router/routes/modules/ai.ts +++ b/vue/apps/web-antd/src/router/routes/modules/ai.ts @@ -54,7 +54,7 @@ const routes: RouteRecordRaw[] = [ component: IFrameView, meta: { icon: 'mdi:wall-fire', - iframeSrc: 'http://171.212.101.199:13010/', + iframeSrc: 'http://s1.ronsunny.cn:13010/', keepAlive: false, title: '检索增强生成', }, diff --git a/vue/apps/web-antd/src/views/remote/index.vue b/vue/apps/web-antd/src/views/remote/index.vue index 6bcb77a..afb8c4a 100644 --- a/vue/apps/web-antd/src/views/remote/index.vue +++ b/vue/apps/web-antd/src/views/remote/index.vue @@ -126,10 +126,7 @@ const disconnectAll = async () => {