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("画像分析模型。留空时继承聊天模型")
|
@ValueDescription("画像分析模型。留空时继承聊天模型")
|
||||||
val profileModel: String by value("")
|
val profileModel: String by value("")
|
||||||
|
|
||||||
@ValueDescription("画像分析模型温度。留空时继承聊天模型温度")
|
|
||||||
val profileModelTemperature: Double? by value(null)
|
|
||||||
|
|
||||||
@ValueDescription("画像分析模型额外请求体JSON。留空时继承聊天模型额外请求体")
|
@ValueDescription("画像分析模型额外请求体JSON。留空时继承聊天模型额外请求体")
|
||||||
val profileModelExtraBody: String by value("")
|
val profileModelExtraBody: String by value("")
|
||||||
|
|
||||||
@@ -198,9 +195,6 @@ object PluginConfig : AutoSavePluginConfig("Config") {
|
|||||||
@ValueDescription("网页摘要模型名称")
|
@ValueDescription("网页摘要模型名称")
|
||||||
val webSummaryModel: String by value("")
|
val webSummaryModel: String by value("")
|
||||||
|
|
||||||
@ValueDescription("网页摘要模型温度,默认为0.1")
|
|
||||||
val webSummaryModelTemperature: Double? by value(0.1)
|
|
||||||
|
|
||||||
@ValueDescription("网页摘要模型额外请求体JSON,会合并到请求体中")
|
@ValueDescription("网页摘要模型额外请求体JSON,会合并到请求体中")
|
||||||
val webSummaryModelExtraBody: String by value("")
|
val webSummaryModelExtraBody: String by value("")
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,11 @@ object LargeLanguageModels {
|
|||||||
data class ProfileEndpoint(
|
data class ProfileEndpoint(
|
||||||
val service: ModelService,
|
val service: ModelService,
|
||||||
val model: String,
|
val model: String,
|
||||||
val temperature: Double?,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
data class WebSummaryEndpoint(
|
data class WebSummaryEndpoint(
|
||||||
val service: ModelService,
|
val service: ModelService,
|
||||||
val model: String,
|
val model: String,
|
||||||
val temperature: Double?,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,7 +182,6 @@ object LargeLanguageModels {
|
|||||||
maxConcurrentRequests = PluginConfig.profileMaxConcurrentRequests,
|
maxConcurrentRequests = PluginConfig.profileMaxConcurrentRequests,
|
||||||
),
|
),
|
||||||
model = model,
|
model = model,
|
||||||
temperature = PluginConfig.profileModelTemperature ?: PluginConfig.chatTemperature,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,7 +201,6 @@ object LargeLanguageModels {
|
|||||||
extraBody = parseExtraBody(PluginConfig.webSummaryModelExtraBody),
|
extraBody = parseExtraBody(PluginConfig.webSummaryModelExtraBody),
|
||||||
),
|
),
|
||||||
model = PluginConfig.webSummaryModel,
|
model = PluginConfig.webSummaryModel,
|
||||||
temperature = PluginConfig.webSummaryModelTemperature,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ class ProfileModelClient(
|
|||||||
val completion = complete(
|
val completion = complete(
|
||||||
ChatCompletionRequest(
|
ChatCompletionRequest(
|
||||||
model = ModelId(endpoint.model),
|
model = ModelId(endpoint.model),
|
||||||
temperature = endpoint.temperature,
|
|
||||||
responseFormat = ChatResponseFormat.JsonObject,
|
responseFormat = ChatResponseFormat.JsonObject,
|
||||||
streamOptions = StreamOptions(includeUsage = true),
|
streamOptions = StreamOptions(includeUsage = true),
|
||||||
messages = listOf(
|
messages = listOf(
|
||||||
@@ -111,7 +110,6 @@ class ProfileModelClient(
|
|||||||
val completion = complete(
|
val completion = complete(
|
||||||
ChatCompletionRequest(
|
ChatCompletionRequest(
|
||||||
model = ModelId(endpoint.model),
|
model = ModelId(endpoint.model),
|
||||||
temperature = endpoint.temperature,
|
|
||||||
responseFormat = ChatResponseFormat.JsonObject,
|
responseFormat = ChatResponseFormat.JsonObject,
|
||||||
streamOptions = StreamOptions(includeUsage = true),
|
streamOptions = StreamOptions(includeUsage = true),
|
||||||
messages = listOf(
|
messages = listOf(
|
||||||
@@ -142,7 +140,6 @@ class ProfileModelClient(
|
|||||||
val completion = complete(
|
val completion = complete(
|
||||||
ChatCompletionRequest(
|
ChatCompletionRequest(
|
||||||
model = ModelId(endpoint.model),
|
model = ModelId(endpoint.model),
|
||||||
temperature = endpoint.temperature,
|
|
||||||
responseFormat = ChatResponseFormat.JsonObject,
|
responseFormat = ChatResponseFormat.JsonObject,
|
||||||
streamOptions = StreamOptions(includeUsage = true),
|
streamOptions = StreamOptions(includeUsage = true),
|
||||||
messages = listOf(
|
messages = listOf(
|
||||||
|
|||||||
@@ -211,7 +211,6 @@ class VisitWeb : BaseAgent(
|
|||||||
endpoint.service.chatCompletions(
|
endpoint.service.chatCompletions(
|
||||||
ChatCompletionRequest(
|
ChatCompletionRequest(
|
||||||
model = ModelId(endpoint.model),
|
model = ModelId(endpoint.model),
|
||||||
temperature = endpoint.temperature,
|
|
||||||
messages = listOf(
|
messages = listOf(
|
||||||
ChatMessage.System(WEB_SUMMARY_SYSTEM_PROMPT),
|
ChatMessage.System(WEB_SUMMARY_SYSTEM_PROMPT),
|
||||||
ChatMessage.User(prompt),
|
ChatMessage.User(prompt),
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ConversationProfileLiveExperiment {
|
|||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
val client = ProfileModelClient(
|
val client = ProfileModelClient(
|
||||||
LargeLanguageModels.ProfileEndpoint(service, modelName, temperature = 0.1)
|
LargeLanguageModels.ProfileEndpoint(service, modelName)
|
||||||
)
|
)
|
||||||
val result = client.analyzeConversation(profiles, batch, eligible)
|
val result = client.analyzeConversation(profiles, batch, eligible)
|
||||||
val reductions = ConversationProfileReducer.reduce(
|
val reductions = ConversationProfileReducer.reduce(
|
||||||
|
|||||||
Reference in New Issue
Block a user