🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
LLMClient.hpp
浏览该文件的文档.
1
20
21
#pragma once
22
23
#include "AstGlobal.h"
24
#include "AstUtil/JsonValue.hpp"
25
26
AST_NAMESPACE_BEGIN
27
33
class
JsonValue;
34
class
ChatEventHandler;
35
38
class
AST_AI_API
LLMClient
39
{
40
public
:
41
LLMClient
() =
default
;
42
virtual
~LLMClient
() =
default
;
43
48
virtual
errc_t
chat
(
const
JsonValue
& request,
JsonValue
& response) = 0;
49
55
virtual
errc_t chatStream(
const
JsonValue
& request,
ChatEventHandler
& handler,
56
JsonValue
& accumulatedResult);
57
61
JsonValue
chat(
const
JsonValue
& request);
62
63
64
};
65
68
AST_NAMESPACE_END
ast::ChatEventHandler
流式聊天事件处理器
定义
ChatEventHandler.hpp:42
ast::JsonValue
JSON 值类
定义
JsonValue.hpp:47
ast::LLMClient
大语言模型客户端接口
定义
LLMClient.hpp:39
ast::LLMClient::chat
virtual errc_t chat(const JsonValue &request, JsonValue &response)=0
发送聊天请求(纯虚接口,子类必须实现)
src
AstAI
Providers
LLMClient.hpp
制作者
1.12.0