feat: [aiManager] add interface#1031
Conversation
|
|
||
| QMap<QString, QVariant> map = OptionManager::getInstance()->getValue(kCATEGORY_CUSTOMMODELS, kCATEGORY_OPTIONKEY).toMap(); | ||
| auto LLMs = map.value(kCATEGORY_CUSTOMMODELS); | ||
| if (LLMs.toList().size() != currentModels.size()) |
There was a problem hiding this comment.
不应该通过个数来判断,模型自身参数的变化也应该有通知
There was a problem hiding this comment.
通过个数判断是为了快速判断模型有没有被删除,不然需要额外用一个循环来判断当前模型是否被删除。 现在还没有支持模型的参数修改,只有新增和删除。
| const QString &deltaData = delta["content"].toString(); | ||
| deltacontent += deltaData; | ||
| } | ||
| if (delta.contains("function_call")) { |
There was a problem hiding this comment.
这里面if太多了,注意优化下。另外这些参数是标准协议里面的吗?
1.event when LLM changed 2.modelname 3.LLM`s idle state to description LLM can send request or not Log: as title
deepin pr auto review关键摘要:
是否建议立即修改:
|
| OPI_INTERFACE(sessionRemoved, "session") | ||
| ) | ||
| OPI_OBJECT(ai, | ||
| OPI_INTERFACE(LLMChanged) |
There was a problem hiding this comment.
这个事件只表示模型数量发生了改变,事件名应该为modelCountChanged
There was a problem hiding this comment.
不是 是模型发生了变化就会发送,不管是模型被删除还是新增。 判断的那里设置Changed,两个判断 一个是模型被删除 一个是有新增
There was a problem hiding this comment.
包括先删除再新增,数量不变,但是模型变化了,也会发送事件
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepin-mozart, LiHua000 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1.event when LLM changed
2.modelname
3.LLM`s idle state to description LLM can send request or not
Log: as title