NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_ai_def.h
浏览该文件的文档.
1#ifndef NIM_SDK_DLL_EXPORT_HEADERS_NIM_AI_DEF_H_
2#define NIM_SDK_DLL_EXPORT_HEADERS_NIM_AI_DEF_H_
3
4#include "nim_global_def.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
11static const char* kNIMAICallKeyAccountID = "account_id";
13static const char* kNIMAICallKeyRequestID = "request_id";
15static const char* kNIMAICallKeyStatus = "status";
16
18static const char* kNIMAICallKeyContent = "content";
20static const char* kNIMAICallKeyContentKeyMsg = "msg";
22static const char* kNIMAICallKeyContentKeyType = "type";
23
25static const char* kNIMAICallKeyMessages = "messages";
27static const char* kNIMAICallKeyMessageKeyRole = "role";
29static const char* kNIMAICallKeyMessageKeyMsg = "msg";
31static const char* kNIMAICallKeyMessageKeyType = "type";
32
34static const char* kNIMAICallKeyPromptVariables = "prompt_variables";
35
37static const char* kNIMAICallKeyModelConfig = "model_config";
39static const char* kNIMAICallKeyModelConfigKeyPrompt = "prompt";
41static const char* kNIMAICallKeyModelConfigKeyMaxTokens = "tokens";
43static const char* kNIMAICallKeyModelConfigKeyTopP = "top_p";
45static const char* kNIMAICallKeyModelConfigKeyTemperature = "temperature";
46
48static const char* kNIMAICallKeyAntispamConfig = "antispam_config";
50static const char* kNIMAICallKeyAntispamConfigKeyEnable = "enable";
52static const char* kNIMAICallKeyAntispamConfigKeyBizID = "antispam_business_id";
53
54static const char* kNIMAICallKeyMessageRoleAssist = "assistant";
55static const char* kNIMAICallKeyMessageRoleUser = "user";
56static const char* kNIMAICallKeyMessageRoleUnknown = "unknown";
57
66};
67
77};
78
79typedef void (*nim_ai_get_ai_user_list_cb)(enum NIMResCode code, const char* result, const void* user_data);
80
81typedef void (*nim_ai_proxy_ai_model_call_cb)(enum NIMResCode code, const void* user_data);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif // NIM_SDK_DLL_EXPORT_HEADERS_NIM_AI_DEF_H_
static const char * kNIMAICallKeyModelConfigKeyTemperature
取值范围 (0, 2), 用于控制随机性和多样性的程度。
Definition: nim_ai_def.h:45
static const char * kNIMAICallKeyMessageRoleUnknown
Definition: nim_ai_def.h:56
static const char * kNIMAICallKeyPromptVariables
提示词变量占位符替换
Definition: nim_ai_def.h:34
void(* nim_ai_proxy_ai_model_call_cb)(enum NIMResCode code, const void *user_data)
Definition: nim_ai_def.h:81
static const char * kNIMAICallKeyModelConfigKeyPrompt
提示词
Definition: nim_ai_def.h:39
static const char * kNIMAICallKeyAntispamConfig
AI proxy 反垃圾配置
Definition: nim_ai_def.h:48
static const char * kNIMAICallKeyMessageRoleUser
Definition: nim_ai_def.h:55
static const char * kNIMAICallKeyMessageKeyType
类型, 暂时只有 0, 代表文本, 预留扩展能力
Definition: nim_ai_def.h:31
static const char * kNIMAICallKeyAntispamConfigKeyBizID
AI proxy 反垃圾配置易盾业务 ID
Definition: nim_ai_def.h:52
void(* nim_ai_get_ai_user_list_cb)(enum NIMResCode code, const char *result, const void *user_data)
Definition: nim_ai_def.h:79
static const char * kNIMAICallKeyModelConfigKeyMaxTokens
模型最大 tokens 数量
Definition: nim_ai_def.h:41
static const char * kNIMAICallKeyAntispamConfigKeyEnable
AI proxy 反垃圾配置 enable
Definition: nim_ai_def.h:50
NIMAIModelType
AI 数字人消息模型类型
Definition: nim_ai_def.h:69
@ kNIMMessageAIModelTypeAzure
微软 Azure
Definition: nim_ai_def.h:74
@ kNIMMessageAIModelTypeQianWen
通义千问
Definition: nim_ai_def.h:72
@ kNIMMessageAIModelTypeUnknown
Definition: nim_ai_def.h:70
@ kNIMMessageAIModelTypePrivate
私有本地大模型
Definition: nim_ai_def.h:76
NIMAIModelRoleType
AI 数字人消息角色类型
Definition: nim_ai_def.h:59
@ kNIMMessageAIModelRoleTypeSystem
系统
Definition: nim_ai_def.h:61
@ kNIMMessageAIModelRoleTypeUser
用户
Definition: nim_ai_def.h:63
@ kNIMMessageAIModelRoleTypeAssistant
助手
Definition: nim_ai_def.h:65
static const char * kNIMAICallKeyMessageKeyMsg
上下文的内容
Definition: nim_ai_def.h:29
static const char * kNIMAICallKeyMessages
上下文内容
Definition: nim_ai_def.h:25
static const char * kNIMAICallKeyModelConfig
请求接口模型相关参数配置, 如果参数不为空, 则默认覆盖控制相关配置
Definition: nim_ai_def.h:37
static const char * kNIMAICallKeyModelConfigKeyTopP
取值范围 (0, 1), 生成时, 核采样方法的概率阈值。
Definition: nim_ai_def.h:43
static const char * kNIMAICallKeyContentKeyMsg
请求/响应的文本内容
Definition: nim_ai_def.h:20
static const char * kNIMAICallKeyMessageRoleAssist
Definition: nim_ai_def.h:54
static const char * kNIMAICallKeyRequestID
AI proxy 请求 ID
Definition: nim_ai_def.h:13
static const char * kNIMAICallKeyMessageKeyRole
上下文内容的角色
Definition: nim_ai_def.h:27
static const char * kNIMAICallKeyStatus
int AI config status
Definition: nim_ai_def.h:15
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
辅助能力 接口相关的常量函数等定义头文件
NIMResCode
Definition: public_defines.h:21