#include <AiApiBridge.h>
◆ AiApiBridge()
| AiApiBridge::AiApiBridge |
( |
| ) |
|
◆ ~AiApiBridge()
| AiApiBridge::~AiApiBridge |
( |
| ) |
|
◆ close()
| void AiApiBridge::close |
( |
| ) |
|
|
private |
◆ Error()
| AiResult AiApiBridge::Error |
( |
std::string const & |
status, |
|
|
std::string const & |
message |
|
) |
| const |
|
inline |
◆ generate_prompt_json()
| std::string AiApiBridge::generate_prompt_json |
( |
const GenerativeAI::Model & |
model, |
|
|
const std::string & |
prompt, |
|
|
std::string const & |
system_role = {} |
|
) |
| |
|
private |
プロンプトをプロバイダー固有のAPIリクエストJSON形式に変換する。
- Parameters
-
| model | 使用するAIモデル情報 |
| prompt | 送信するプロンプト文字列 |
- Returns
- APIリクエスト用JSON文字列
◆ http()
◆ model()
現在設定されているAIモデルを返す。
- Returns
- AIモデル情報
◆ open()
◆ queryModels()
◆ request() [1/2]
| AiResult AiApiBridge::request |
( |
const std::string & |
prompt | ) |
|
◆ request() [2/2]
指定されたエンドポイントタイプに対してプロンプトを送信し、AIの応答を取得する。
- Parameters
-
| eptype | エンドポイントの種類(例: Chat, Modelsなど) |
| prompt | 送信するプロンプト文字列 |
| req | 追加のリクエスト情報(将来的な拡張用) |
- Returns
- AIからの応答を含むAiResultオブジェクト
◆ set_ai_model()
使用するAIモデルを設定する。
- Parameters
-
◆ set_system_role()
| void AiApiBridge::set_system_role |
( |
std::string const & |
role | ) |
|
◆ x_request()
◆ AiSession
The documentation for this class was generated from the following files: