mirror of
https://github.com/jie65535/JChatGPT.git
synced 2026-09-15 02:56:10 +08:00
models: use provider defaults for extraction tasks
This commit is contained in:
@@ -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("")
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user