Revert "fix: qwen3 cannot name a topic (#6722)"

This reverts commit 15f93e53f2.
This commit is contained in:
kangfenmao 2025-06-11 20:31:24 +08:00
parent 1f2c467fd4
commit 4eb3f4b5b4
9 changed files with 3 additions and 19 deletions

View File

@ -99,8 +99,6 @@ export const autoRenameTopic = async (assistant: Assistant, topicId: string) =>
const data = { ...topic, name: summaryText }
_setActiveTopic(data)
store.dispatch(updateTopic({ assistantId: assistant.id, topic: data }))
} else {
window.message?.error(i18n.t('message.error.fetchTopicName'))
}
}
} finally {

View File

@ -633,7 +633,6 @@
"error.enter.api.key": "APIキーを入力してください",
"error.enter.model": "モデルを選択してください",
"error.enter.name": "ナレッジベース名を入力してください",
"error.fetchTopicName": "トピックの命名に失敗しました",
"error.get_embedding_dimensions": "埋込み次元を取得できませんでした",
"error.invalid.api.host": "無効なAPIアドレスです",
"error.invalid.api.key": "無効なAPIキーです",

View File

@ -633,7 +633,6 @@
"error.enter.api.key": "Пожалуйста, введите ваш API ключ",
"error.enter.model": "Пожалуйста, выберите модель",
"error.enter.name": "Пожалуйста, введите название базы знаний",
"error.fetchTopicName": "Не удалось назвать тему",
"error.get_embedding_dimensions": "Не удалось получить размерность встраивания",
"error.invalid.api.host": "Неверный API адрес",
"error.invalid.api.key": "Неверный API ключ",

View File

@ -556,7 +556,6 @@
"error.enter.api.key": "Παρακαλώ εισάγετε το κλειδί API σας",
"error.enter.model": "Παρακαλώ επιλέξτε ένα μοντέλο",
"error.enter.name": "Παρακαλώ εισάγετε ένα όνομα για τη βάση γνώσεων",
"error.fetchTopicName": "Αποτυχία ονοματοδοσίας θέματος",
"error.get_embedding_dimensions": "Απέτυχε η πρόσληψη διαστάσεων ενσωμάτωσης",
"error.invalid.api.host": "Μη έγκυρη διεύθυνση API",
"error.invalid.api.key": "Μη έγκυρο κλειδί API",

View File

@ -557,7 +557,6 @@
"error.enter.api.key": "Ingrese su clave API",
"error.enter.model": "Seleccione un modelo",
"error.enter.name": "Ingrese el nombre de la base de conocimiento",
"error.fetchTopicName": "Error al nombrar el tema",
"error.get_embedding_dimensions": "Fallo al obtener las dimensiones de incrustación",
"error.invalid.api.host": "Dirección API inválida",
"error.invalid.api.key": "Clave API inválida",

View File

@ -556,7 +556,6 @@
"error.enter.api.key": "Veuillez entrer votre clé API",
"error.enter.model": "Veuillez sélectionner un modèle",
"error.enter.name": "Veuillez entrer le nom de la base de connaissances",
"error.fetchTopicName": "Échec de la dénomination du sujet",
"error.get_embedding_dimensions": "Impossible d'obtenir les dimensions d'encodage",
"error.invalid.api.host": "Adresse API invalide",
"error.invalid.api.key": "Clé API invalide",

View File

@ -558,7 +558,6 @@
"error.enter.api.key": "Insira sua chave API",
"error.enter.model": "Selecione um modelo",
"error.enter.name": "Insira o nome da base de conhecimento",
"error.fetchTopicName": "Falha ao nomear o tópico",
"error.get_embedding_dimensions": "Falha ao obter dimensões de incorporação",
"error.invalid.api.host": "Endereço API inválido",
"error.invalid.api.key": "Chave API inválida",

View File

@ -1021,20 +1021,14 @@ export default class OpenAIProvider extends BaseOpenAIProvider {
await this.checkIsCopilot()
const params = {
// @ts-ignore key is not typed
const response = await this.sdk.chat.completions.create({
model: model.id,
messages: [systemMessage, userMessage] as ChatCompletionMessageParam[],
stream: false,
keep_alive: this.keepAliveTime,
max_tokens: 1000
}
if (isSupportedThinkingTokenQwenModel(model)) {
params['enable_thinking'] = false
}
// @ts-ignore key is not typed
const response = await this.sdk.chat.completions.create(params as ChatCompletionCreateParamsNonStreaming)
})
// 针对思考类模型的返回,总结仅截取</think>之后的内容
let content = response.choices[0].message?.content || ''

View File

@ -230,8 +230,6 @@ export async function getMessageTitle(message: Message, length = 30): Promise<st
if (title) {
window.message.success({ content: t('chat.topics.export.title_naming_success'), key: 'message-title-naming' })
return title
} else {
window.message?.error(t('message.error.fetchTopicName'))
}
} catch (e) {
window.message.error({ content: t('chat.topics.export.title_naming_failed'), key: 'message-title-naming' })