From c0dd34741ae0483e02ddc7985b0c86f21eaebb98 Mon Sep 17 00:00:00 2001 From: jie65535 Date: Fri, 7 Aug 2026 11:41:00 +0800 Subject: [PATCH] models: use provider defaults for extraction tasks --- src/main/kotlin/config/PluginConfig.kt | 6 ------ src/main/kotlin/llm/LargeLanguageModels.kt | 10 +++------- src/main/kotlin/profile/ProfileModelClient.kt | 3 --- src/main/kotlin/tools/VisitWeb.kt | 1 - .../profile/ConversationProfileLiveExperiment.kt | 2 +- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/main/kotlin/config/PluginConfig.kt b/src/main/kotlin/config/PluginConfig.kt index 562125c..a65ba07 100644 --- a/src/main/kotlin/config/PluginConfig.kt +++ b/src/main/kotlin/config/PluginConfig.kt @@ -69,9 +69,6 @@ object PluginConfig : AutoSavePluginConfig("Config") { @ValueDescription("画像分析模型。留空时继承聊天模型") val profileModel: String by value("") - @ValueDescription("画像分析模型温度。留空时继承聊天模型温度") - val profileModelTemperature: Double? by value(null) - @ValueDescription("画像分析模型额外请求体JSON。留空时继承聊天模型额外请求体") val profileModelExtraBody: String by value("") @@ -198,9 +195,6 @@ object PluginConfig : AutoSavePluginConfig("Config") { @ValueDescription("网页摘要模型名称") val webSummaryModel: String by value("") - @ValueDescription("网页摘要模型温度,默认为0.1") - val webSummaryModelTemperature: Double? by value(0.1) - @ValueDescription("网页摘要模型额外请求体JSON,会合并到请求体中") val webSummaryModelExtraBody: String by value("") diff --git a/src/main/kotlin/llm/LargeLanguageModels.kt b/src/main/kotlin/llm/LargeLanguageModels.kt index 4c9e7e4..b629f41 100644 --- a/src/main/kotlin/llm/LargeLanguageModels.kt +++ b/src/main/kotlin/llm/LargeLanguageModels.kt @@ -30,13 +30,11 @@ object LargeLanguageModels { data class ProfileEndpoint( val service: ModelService, val model: String, - val temperature: Double?, ) data class WebSummaryEndpoint( val service: ModelService, val model: String, - val temperature: Double?, ) /** @@ -182,10 +180,9 @@ object LargeLanguageModels { firstChunkTimeout = profileFirstChunk, extraBody = parseExtraBody(extraBody), maxConcurrentRequests = PluginConfig.profileMaxConcurrentRequests, - ), - model = model, - temperature = PluginConfig.profileModelTemperature ?: PluginConfig.chatTemperature, - ) + ), + model = model, + ) } } @@ -204,7 +201,6 @@ object LargeLanguageModels { extraBody = parseExtraBody(PluginConfig.webSummaryModelExtraBody), ), model = PluginConfig.webSummaryModel, - temperature = PluginConfig.webSummaryModelTemperature, ) } diff --git a/src/main/kotlin/profile/ProfileModelClient.kt b/src/main/kotlin/profile/ProfileModelClient.kt index d034ec5..77be439 100644 --- a/src/main/kotlin/profile/ProfileModelClient.kt +++ b/src/main/kotlin/profile/ProfileModelClient.kt @@ -78,7 +78,6 @@ class ProfileModelClient( val completion = complete( ChatCompletionRequest( model = ModelId(endpoint.model), - temperature = endpoint.temperature, responseFormat = ChatResponseFormat.JsonObject, streamOptions = StreamOptions(includeUsage = true), messages = listOf( @@ -111,7 +110,6 @@ class ProfileModelClient( val completion = complete( ChatCompletionRequest( model = ModelId(endpoint.model), - temperature = endpoint.temperature, responseFormat = ChatResponseFormat.JsonObject, streamOptions = StreamOptions(includeUsage = true), messages = listOf( @@ -142,7 +140,6 @@ class ProfileModelClient( val completion = complete( ChatCompletionRequest( model = ModelId(endpoint.model), - temperature = endpoint.temperature, responseFormat = ChatResponseFormat.JsonObject, streamOptions = StreamOptions(includeUsage = true), messages = listOf( diff --git a/src/main/kotlin/tools/VisitWeb.kt b/src/main/kotlin/tools/VisitWeb.kt index 4dbb737..c75883e 100644 --- a/src/main/kotlin/tools/VisitWeb.kt +++ b/src/main/kotlin/tools/VisitWeb.kt @@ -211,7 +211,6 @@ class VisitWeb : BaseAgent( endpoint.service.chatCompletions( ChatCompletionRequest( model = ModelId(endpoint.model), - temperature = endpoint.temperature, messages = listOf( ChatMessage.System(WEB_SUMMARY_SYSTEM_PROMPT), ChatMessage.User(prompt), diff --git a/src/test/kotlin/profile/ConversationProfileLiveExperiment.kt b/src/test/kotlin/profile/ConversationProfileLiveExperiment.kt index 2682e2f..d9677c5 100644 --- a/src/test/kotlin/profile/ConversationProfileLiveExperiment.kt +++ b/src/test/kotlin/profile/ConversationProfileLiveExperiment.kt @@ -51,7 +51,7 @@ class ConversationProfileLiveExperiment { ) try { val client = ProfileModelClient( - LargeLanguageModels.ProfileEndpoint(service, modelName, temperature = 0.1) + LargeLanguageModels.ProfileEndpoint(service, modelName) ) val result = client.analyzeConversation(profiles, batch, eligible) val reductions = ConversationProfileReducer.reduce(