-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不应该通过个数来判断,模型自身参数的变化也应该有通知
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
通过个数判断是为了快速判断模型有没有被删除,不然需要额外用一个循环来判断当前模型是否被删除。 现在还没有支持模型的参数修改,只有新增和删除。
@@ -42,6 +45,52 @@ QJsonObject OpenAiCompatibleConversation::parseContentString(const QString &cont | |||
const QString &deltaData = delta["content"].toString(); | |||
deltacontent += deltaData; | |||
} | |||
if (delta.contains("function_call")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里面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关键摘要:
是否建议立即修改:
|
@@ -133,6 +133,9 @@ OPI_OBJECT(session, | |||
OPI_INTERFACE(sessionRenamed, "oldName", "newName") | |||
OPI_INTERFACE(sessionRemoved, "session") | |||
) | |||
OPI_OBJECT(ai, | |||
OPI_INTERFACE(LLMChanged) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个事件只表示模型数量发生了改变,事件名应该为modelCountChanged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是 是模型发生了变化就会发送,不管是模型被删除还是新增。 判断的那里设置Changed,两个判断 一个是模型被删除 一个是有新增
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
包括先删除再新增,数量不变,但是模型变化了,也会发送事件
/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
Needs 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