node-nim 10.8.10-beta.141 → 10.8.10-beta.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { V2NIMAIUser,
|
|
1
|
+
import { V2NIMAIUser, V2NIMAIModelCallResult, V2NIMProxyAIModelCallParams } from 'ts/v2_def/v2_nim_struct_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
3
|
export declare interface V2NIMAIListener {
|
|
4
4
|
/** 数字人请求回调 */
|
|
5
|
-
proxyAIModelCall: [
|
|
5
|
+
proxyAIModelCall: [V2NIMAIModelCallResult];
|
|
6
6
|
}
|
|
7
7
|
export declare class V2NIMAIService extends EventEmitter<V2NIMAIListener> {
|
|
8
8
|
instance: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V2NIMAIModelType, V2NIMAsymmetricEncryptionAlgorithm, V2NIMChatroomKickedReason, V2NIMChatroomMemberRole, V2NIMChatroomMessageNotificationType, V2NIMChatroomQueueChangeType, V2NIMChatroomQueueLevelMode, V2NIMClientAntispamOperateType, V2NIMClientAntispamThesaurusMatchType, V2NIMConversationType, V2NIMDataSyncType, V2NIMDownloadAttachmentType, V2NIMFCSAuthType, V2NIMFriendAddApplicationStatus, V2NIMFriendAddMode, V2NIMIPProtocolVersion, V2NIMLoginAuthType, V2NIMLoginClientType, V2NIMMessageAttachmentUploadState, V2NIMMessageClientAntispamOperatorType, V2NIMMessageNotificationType, V2NIMMessagePinState, V2NIMMessageRevokeType, V2NIMMessageSendingState, V2NIMMessageType, V2NIMProxyRequestMethod, V2NIMQueryDirection, V2NIMSDKLogLevel, V2NIMSignallingChannelType, V2NIMSignallingEventType, V2NIMSortOrder, V2NIMSQLCipherVersion, V2NIMSymmetricEncryptionAlgorithm, V2NIMTeamAgreeMode, V2NIMTeamChatBannedMode, V2NIMTeamInviteMode, V2NIMTeamJoinActionStatus, V2NIMTeamJoinActionType, V2NIMTeamJoinMode, V2NIMTeamMemberRole, V2NIMTeamMemberRoleQueryType, V2NIMTeamType, V2NIMTeamUpdateExtensionMode, V2NIMTeamUpdateInfoMode, V2NIMSearchKeywordMathType, V2NIMClearHistoryMode } from './v2_nim_enum_def';
|
|
1
|
+
import { V2NIMAIModelType, V2NIMAsymmetricEncryptionAlgorithm, V2NIMChatroomKickedReason, V2NIMChatroomMemberRole, V2NIMChatroomMessageNotificationType, V2NIMChatroomQueueChangeType, V2NIMChatroomQueueLevelMode, V2NIMClientAntispamOperateType, V2NIMClientAntispamThesaurusMatchType, V2NIMConversationType, V2NIMDataSyncType, V2NIMDownloadAttachmentType, V2NIMFCSAuthType, V2NIMFriendAddApplicationStatus, V2NIMFriendAddMode, V2NIMIPProtocolVersion, V2NIMLoginAuthType, V2NIMLoginClientType, V2NIMMessageAttachmentUploadState, V2NIMMessageClientAntispamOperatorType, V2NIMMessageNotificationType, V2NIMMessagePinState, V2NIMMessageRevokeType, V2NIMMessageSendingState, V2NIMMessageType, V2NIMProxyRequestMethod, V2NIMQueryDirection, V2NIMSDKLogLevel, V2NIMSignallingChannelType, V2NIMSignallingEventType, V2NIMSortOrder, V2NIMSQLCipherVersion, V2NIMSymmetricEncryptionAlgorithm, V2NIMTeamAgreeMode, V2NIMTeamChatBannedMode, V2NIMTeamInviteMode, V2NIMTeamJoinActionStatus, V2NIMTeamJoinActionType, V2NIMTeamJoinMode, V2NIMTeamMemberRole, V2NIMTeamMemberRoleQueryType, V2NIMTeamType, V2NIMTeamUpdateExtensionMode, V2NIMTeamUpdateInfoMode, V2NIMSearchKeywordMathType, V2NIMClearHistoryMode, V2NIMAIModelRoleType } from './v2_nim_enum_def';
|
|
2
2
|
export interface V2NIMError {
|
|
3
3
|
/** 错误码, 详见 V2NIMErrorCode */
|
|
4
4
|
code?: number;
|
|
@@ -442,7 +442,7 @@ export interface V2NIMAIModelConfigParams {
|
|
|
442
442
|
/** 取值范围(0,2),用于控制随机性和多样性的程度。 */
|
|
443
443
|
temperature?: number;
|
|
444
444
|
}
|
|
445
|
-
export interface
|
|
445
|
+
export interface V2NIMAIModelCallResult {
|
|
446
446
|
/** AI 响应的状态码 */
|
|
447
447
|
code?: number;
|
|
448
448
|
/** 数字人的账户 ID */
|
|
@@ -592,6 +592,23 @@ export interface V2NIMMessageTargetConfig {
|
|
|
592
592
|
/** 新成员是否可以查看该定向消息 */
|
|
593
593
|
newMemberVisible?: boolean;
|
|
594
594
|
}
|
|
595
|
+
export interface V2NIMAIModelCallMessage {
|
|
596
|
+
role: V2NIMAIModelRoleType;
|
|
597
|
+
msg: string;
|
|
598
|
+
type: number;
|
|
599
|
+
}
|
|
600
|
+
export interface V2NIMMessageAIConfigParams {
|
|
601
|
+
/** 数字人账号信息 */
|
|
602
|
+
accountId: string;
|
|
603
|
+
/** 请求大模型的内容 */
|
|
604
|
+
content?: V2NIMAIModelCallContent;
|
|
605
|
+
/** 上下文内容 */
|
|
606
|
+
messages?: Array<V2NIMAIModelCallMessage>;
|
|
607
|
+
/** 提示词变量占位符替换 */
|
|
608
|
+
promptVariables?: string;
|
|
609
|
+
/** 请求接口模型相关参数配置, 如果参数不为空, 则默认覆盖控制相关配置 */
|
|
610
|
+
modelConfigParams?: V2NIMAIModelConfigParams;
|
|
611
|
+
}
|
|
595
612
|
export interface V2NIMSendMessageParams {
|
|
596
613
|
/** 消息相关配置 */
|
|
597
614
|
messageConfig?: V2NIMMessageConfig;
|
|
@@ -603,6 +620,8 @@ export interface V2NIMSendMessageParams {
|
|
|
603
620
|
antispamConfig?: V2NIMMessageAntispamConfig;
|
|
604
621
|
/** 机器人相关配置 */
|
|
605
622
|
robotConfig?: V2NIMMessageRobotConfig;
|
|
623
|
+
/** 请求大模型的相关参数 */
|
|
624
|
+
aiConfig?: V2NIMMessageAIConfigParams;
|
|
606
625
|
/** 用以控制在发送群组消息时,消息是否发送给指定的群组成员 */
|
|
607
626
|
targetConfig?: V2NIMMessageTargetConfig;
|
|
608
627
|
/** 是否启用本地反垃圾 */
|