调整所有IP地址为域名,方便日后管理
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user