|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
#include <ChatMessage.hpp>
Public 成员函数 | |
| ChatMessage ()=default | |
| ChatMessage (EChatRole role, StringView content) | |
| ~ChatMessage ()=default | |
| AST_AI_API JsonValue | toJson () const |
| void | setRole (EChatRole role) |
| EChatRole | role () const |
| void | setName (const std::string &name) |
| std::string | name () const |
| void | setContent (StringView content) |
| std::string | content () const |
| void | setReasoningContent (StringView reasoningContent) |
| std::string | reasoningContent () const |
| void | setToolCallId (StringView toolCallId) |
| std::string | toolCallId () const |
| void | setToolCalls (const JsonValue &toolCalls) |
| const JsonValue & | toolCalls () const |
静态 Public 成员函数 | |
| static ChatMessage | System (StringView content) |
| static ChatMessage | User (StringView content) |
| static ChatMessage | Assistant (StringView content) |
| static ChatMessage | Assistant (StringView content, const JsonValue &toolCalls) |
| static ChatMessage | Tool (StringView content, StringView toolCallId) |
聊天消息
|
inline |
构造函数
| role | 消息角色 |
| content | 消息内容 |
|
inlinestatic |
创建助手消息
| content | 助手消息内容 |
|
inlinestatic |
创建系统提示消息
| content | 系统提示 |
| JsonValue ast::ChatMessage::toJson | ( | ) | const |
转换为JSON值
|
inlinestatic |
创建工具消息
| content | 工具消息内容 |
| toolCallId | 工具调用ID |
|
inlinestatic |
创建用户消息
| content | 用户消息内容 |