NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
nim_ai_def.h 文件参考
#include "nim_global_def.h"

浏览源代码.

类型定义

typedef void(* nim_ai_get_ai_user_list_cb) (enum NIMResCode code, const char *result, const void *user_data)
 
typedef void(* nim_ai_proxy_ai_model_call_cb) (enum NIMResCode code, const void *user_data)
 

枚举

enum  NIMAIModelRoleType { kNIMMessageAIModelRoleTypeSystem = 0 , kNIMMessageAIModelRoleTypeUser = 1 , kNIMMessageAIModelRoleTypeAssistant = 2 }
 AI 数字人消息角色类型 更多...
 
enum  NIMAIModelType { kNIMMessageAIModelTypeUnknown , kNIMMessageAIModelTypeQianWen , kNIMMessageAIModelTypeAzure , kNIMMessageAIModelTypePrivate }
 AI 数字人消息模型类型 更多...
 

变量

static const char * kNIMAICallKeyAccountID = "account_id"
 string AI account id
 
static const char * kNIMAICallKeyRequestID = "request_id"
 AI proxy 请求 ID
 
static const char * kNIMAICallKeyStatus = "status"
 int AI config status
 
static const char * kNIMAICallKeyContent = "content"
 请求大模型的内容
 
static const char * kNIMAICallKeyContentKeyMsg = "msg"
 请求/响应的文本内容
 
static const char * kNIMAICallKeyContentKeyType = "type"
 类型, 暂时只有 0, 代表文本, 预留扩展能力
 
static const char * kNIMAICallKeyMessages = "messages"
 上下文内容
 
static const char * kNIMAICallKeyMessageKeyRole = "role"
 上下文内容的角色
 
static const char * kNIMAICallKeyMessageKeyMsg = "msg"
 上下文的内容
 
static const char * kNIMAICallKeyMessageKeyType = "type"
 类型, 暂时只有 0, 代表文本, 预留扩展能力
 
static const char * kNIMAICallKeyPromptVariables = "prompt_variables"
 提示词变量占位符替换
 
static const char * kNIMAICallKeyModelConfig = "model_config"
 请求接口模型相关参数配置, 如果参数不为空, 则默认覆盖控制相关配置
 
static const char * kNIMAICallKeyModelConfigKeyPrompt = "prompt"
 提示词
 
static const char * kNIMAICallKeyModelConfigKeyMaxTokens = "tokens"
 模型最大 tokens 数量
 
static const char * kNIMAICallKeyModelConfigKeyTopP = "top_p"
 取值范围 (0, 1), 生成时, 核采样方法的概率阈值。
 
static const char * kNIMAICallKeyModelConfigKeyTemperature = "temperature"
 取值范围 (0, 2), 用于控制随机性和多样性的程度。
 
static const char * kNIMAICallKeyAntispamConfig = "antispam_config"
 AI proxy 反垃圾配置
 
static const char * kNIMAICallKeyAntispamConfigKeyEnable = "enable"
 AI proxy 反垃圾配置 enable
 
static const char * kNIMAICallKeyAntispamConfigKeyBizID = "antispam_business_id"
 AI proxy 反垃圾配置易盾业务 ID
 
static const char * kNIMAICallKeyMessageRoleAssist = "assistant"
 
static const char * kNIMAICallKeyMessageRoleUser = "user"
 
static const char * kNIMAICallKeyMessageRoleUnknown = "unknown"
 

类型定义说明

◆ nim_ai_get_ai_user_list_cb

typedef void(* nim_ai_get_ai_user_list_cb) (enum NIMResCode code, const char *result, const void *user_data)

◆ nim_ai_proxy_ai_model_call_cb

typedef void(* nim_ai_proxy_ai_model_call_cb) (enum NIMResCode code, const void *user_data)

枚举类型说明

◆ NIMAIModelRoleType

AI 数字人消息角色类型

枚举值
kNIMMessageAIModelRoleTypeSystem 

系统

kNIMMessageAIModelRoleTypeUser 

用户

kNIMMessageAIModelRoleTypeAssistant 

助手

◆ NIMAIModelType

AI 数字人消息模型类型

枚举值
kNIMMessageAIModelTypeUnknown 
kNIMMessageAIModelTypeQianWen 

通义千问

kNIMMessageAIModelTypeAzure 

微软 Azure

kNIMMessageAIModelTypePrivate 

私有本地大模型

变量说明

◆ kNIMAICallKeyAccountID

const char* kNIMAICallKeyAccountID = "account_id"
static

string AI account id

◆ kNIMAICallKeyAntispamConfig

const char* kNIMAICallKeyAntispamConfig = "antispam_config"
static

AI proxy 反垃圾配置

◆ kNIMAICallKeyAntispamConfigKeyBizID

const char* kNIMAICallKeyAntispamConfigKeyBizID = "antispam_business_id"
static

AI proxy 反垃圾配置易盾业务 ID

◆ kNIMAICallKeyAntispamConfigKeyEnable

const char* kNIMAICallKeyAntispamConfigKeyEnable = "enable"
static

AI proxy 反垃圾配置 enable

◆ kNIMAICallKeyContent

const char* kNIMAICallKeyContent = "content"
static

请求大模型的内容

◆ kNIMAICallKeyContentKeyMsg

const char* kNIMAICallKeyContentKeyMsg = "msg"
static

请求/响应的文本内容

◆ kNIMAICallKeyContentKeyType

const char* kNIMAICallKeyContentKeyType = "type"
static

类型, 暂时只有 0, 代表文本, 预留扩展能力

◆ kNIMAICallKeyMessageKeyMsg

const char* kNIMAICallKeyMessageKeyMsg = "msg"
static

上下文的内容

◆ kNIMAICallKeyMessageKeyRole

const char* kNIMAICallKeyMessageKeyRole = "role"
static

上下文内容的角色

◆ kNIMAICallKeyMessageKeyType

const char* kNIMAICallKeyMessageKeyType = "type"
static

类型, 暂时只有 0, 代表文本, 预留扩展能力

◆ kNIMAICallKeyMessageRoleAssist

const char* kNIMAICallKeyMessageRoleAssist = "assistant"
static

◆ kNIMAICallKeyMessageRoleUnknown

const char* kNIMAICallKeyMessageRoleUnknown = "unknown"
static

◆ kNIMAICallKeyMessageRoleUser

const char* kNIMAICallKeyMessageRoleUser = "user"
static

◆ kNIMAICallKeyMessages

const char* kNIMAICallKeyMessages = "messages"
static

上下文内容

◆ kNIMAICallKeyModelConfig

const char* kNIMAICallKeyModelConfig = "model_config"
static

请求接口模型相关参数配置, 如果参数不为空, 则默认覆盖控制相关配置

◆ kNIMAICallKeyModelConfigKeyMaxTokens

const char* kNIMAICallKeyModelConfigKeyMaxTokens = "tokens"
static

模型最大 tokens 数量

◆ kNIMAICallKeyModelConfigKeyPrompt

const char* kNIMAICallKeyModelConfigKeyPrompt = "prompt"
static

提示词

◆ kNIMAICallKeyModelConfigKeyTemperature

const char* kNIMAICallKeyModelConfigKeyTemperature = "temperature"
static

取值范围 (0, 2), 用于控制随机性和多样性的程度。

◆ kNIMAICallKeyModelConfigKeyTopP

const char* kNIMAICallKeyModelConfigKeyTopP = "top_p"
static

取值范围 (0, 1), 生成时, 核采样方法的概率阈值。

◆ kNIMAICallKeyPromptVariables

const char* kNIMAICallKeyPromptVariables = "prompt_variables"
static

提示词变量占位符替换

◆ kNIMAICallKeyRequestID

const char* kNIMAICallKeyRequestID = "request_id"
static

AI proxy 请求 ID

◆ kNIMAICallKeyStatus

const char* kNIMAICallKeyStatus = "status"
static

int AI config status