41 bool antispam_enabled_{
true};
45 std::string ToJsonString()
const;
68 int32_t max_tokens_{0};
72 float temperature_{0.0};
80 max_tokens_ = max_tokens;
90 temperature_ = temperature;
98 unsigned int field_valid_flags_{0};
156 prompt_keys_ = prompt_keys;
175 model_type_ = model_type;
181 model_config_ = model_config;
186 std::string ToJsonString()
const;
Represents a JSON value.
Definition value.h:196
bool isMember(const char *key) const
Definition json_value.cpp:1241
String asString() const
Embedded zeroes are possible.
Definition json_value.cpp:632
bool ParseJsonValue(const std::string &content, nim_cpp_wrapper_util::Json::Value &values)
解析JsonString
Definition nim_json_util.cpp:70
@ kUserNameCardKeyModelConfig
Model config 字段有效
Definition nim_user_helper.h:44
@ kUserNameCardKeyModelType
Model type 字段有效
Definition nim_user_helper.h:42
void ParseAIUserModelConfig(const nim_cpp_wrapper_util::Json::Value &model_config_json, NIMAIModelConfig &model_config)
解析数字人模型配置
Definition nim_ai_helper.cpp:179
bool ParseAIUserNameCards(const std::string &namecards_json, std::list< AIUserNameCard > &namecards)
Definition nim_ai_helper.cpp:114
NIMAIModelConfigFieldFlag
Definition nim_ai_helper.h:48
@ kAIModelConfigFieldFlagTemperature
Temperature 字段有效
Definition nim_ai_helper.h:56
@ kAIModelConfigFieldFlagPromptKeys
Prompt keys 字段有效
Definition nim_ai_helper.h:60
@ kAIModelConfigFieldFlagModel
Model 字段有效
Definition nim_ai_helper.h:58
@ kAIModelConfigFieldFlagMaxTokens
Max tokens 字段有效
Definition nim_ai_helper.h:52
@ kAIModelConfigFieldFlagTopP
Top p 字段有效
Definition nim_ai_helper.h:54
@ kAIModelConfigFieldFlagPrompt
Prompt 字段有效
Definition nim_ai_helper.h:50
bool ParseAIUserNameCard(const std::string &namecard_json, AIUserNameCard &namecard)
Definition nim_ai_helper.cpp:136
AIUserNameCardFieldFlag
AI 数字人名片字段有效性校验
Definition nim_ai_helper.h:163
NIMAIModelType
AI 数字人消息模型类型
Definition nim_ai_def.h:69
NIMAIModelRoleType
AI 数字人消息角色类型
Definition nim_ai_def.h:59
@ kNIMMessageAIModelRoleTypeSystem
系统
Definition nim_ai_def.h:61
static const char * kNIMAICallKeyContentKeyMsg
请求/响应的文本内容
Definition nim_ai_def.h:20
static const char * kNIMAICallKeyRequestID
AI proxy 请求 ID
Definition nim_ai_def.h:13
static const char * kNIMAICallKeyAccountID
string AI account id
Definition nim_ai_def.h:11
static const char * kNIMAICallKeyContentKeyType
类型, 暂时只有 0, 代表文本, 预留扩展能力
Definition nim_ai_def.h:22
static const char * kNIMAICallKeyContent
请求大模型的内容
Definition nim_ai_def.h:18
#define NIM_SDK_CPPWRAPPER_DLL_API
Definition nim_sdk_cpp_wrapper.h:38
AI 数字人用户信息
Definition nim_ai_helper.h:168
NIMAIModelType model_type_
模型选择
Definition nim_ai_helper.h:170
void SetModelType(NIMAIModelType model_type)
Definition nim_ai_helper.h:174
NIMAIModelConfig GetModelConfig() const
Definition nim_ai_helper.h:184
NIMAIModelConfig model_config_
模型相关配置文件
Definition nim_ai_helper.h:172
void SetModelConfig(const NIMAIModelConfig &model_config)
Definition nim_ai_helper.h:180
NIMAIModelType GetModelType() const
Definition nim_ai_helper.h:178
Definition nim_ai_helper.h:103
NIMAIModelCallContent content_
请求大模型的内容
Definition nim_ai_helper.h:107
std::string prompt_variables_
提示词变量占位符替换
Definition nim_ai_helper.h:111
NIMAIModelConfigParams model_config_params_
请求接口模型相关参数配置, 如果参数不为空,则默认覆盖控制相关配置
Definition nim_ai_helper.h:113
std::string account_id_
机器人账号 ID
Definition nim_ai_helper.h:105
std::list< NIMAIModelCallMessage > messages_
上下文内容
Definition nim_ai_helper.h:109
调用大模型的请求内容
Definition nim_ai_helper.h:21
std::string msg_
请求/响应的文本内容
Definition nim_ai_helper.h:23
int32_t type_
类型, 暂时只有 0, 代表文本, 预留扩展能力
Definition nim_ai_helper.h:25
AI 数字人消息上下文参数
Definition nim_ai_helper.h:29
std::string msg_
上下文的内容
Definition nim_ai_helper.h:33
AI 数字人代理请求结果
Definition nim_ai_helper.h:119
void FromJsonString(const std::string &json_string)
Definition nim_ai_helper.h:126
std::string request_id_
本次响应的标识
Definition nim_ai_helper.h:123
NIMAIModelCallContent content_
请求 AI 的回复
Definition nim_ai_helper.h:125
std::string account_id_
数字人的账号 ID
Definition nim_ai_helper.h:121
AI 数字人模型配置参数
Definition nim_ai_helper.h:64
bool ExistValue(NIMAIModelConfigFieldFlag flag) const
Definition nim_ai_helper.h:95
void SetTemperature(float temperature)
Definition nim_ai_helper.h:89
float GetTopP() const
Definition nim_ai_helper.h:88
void SetPrompt(const std::string &prompt)
Definition nim_ai_helper.h:74
std::string prompt_
提示词
Definition nim_ai_helper.h:66
std::string GetPrompt() const
Definition nim_ai_helper.h:78
int32_t GetMaxTokens() const
Definition nim_ai_helper.h:83
void SetMaxTokens(int32_t max_tokens)
Definition nim_ai_helper.h:79
float GetTemperature() const
Definition nim_ai_helper.h:93
void SetTopP(float top_p)
Definition nim_ai_helper.h:84
AI 数字人模型类型
Definition nim_ai_helper.h:144
std::list< std::string > prompt_keys_
提示词对应的变量
Definition nim_ai_helper.h:148
std::list< std::string > GetPromptKeys() const
Definition nim_ai_helper.h:159
std::string model_
具体大模型版本模型名
Definition nim_ai_helper.h:146
void SetModel(const std::string &model)
Definition nim_ai_helper.h:150
void SetPromptKeys(const std::list< std::string > &prompt_keys)
Definition nim_ai_helper.h:155
std::string GetModel() const
Definition nim_ai_helper.h:154
AI 数字人代理请求反垃圾配置
Definition nim_ai_helper.h:39
std::string antispam_business_id_
指定易盾业务id
Definition nim_ai_helper.h:43
云信用户名片
Definition nim_user_helper.h:50