|
Guitar
|
AIプロバイダーごとのリクエストJSONを生成するビジタークラス。 More...


Public Member Functions | |
| _PromptJsonGenerator (GenerativeAI::Model const &model, std::string const &prompt) | |
| std::string | modelname () const |
| std::string | case_Unknown () |
| 未知プロバイダー:空文字列を返す More... | |
| std::string | case_OpenAI_responses () |
| OpenAI Responses API 向けのリクエストJSONを生成する。 More... | |
| std::string | case_OpenAI_chat_completions () |
| OpenAI Chat Completions API 向けのリクエストJSONを生成する。 More... | |
| std::string | case_Anthropic () |
| Anthropic Claude 向けのリクエストJSONを生成する。 More... | |
| std::string | case_Google () |
| Google Gemini 向けのリクエストJSONを生成する。 More... | |
| std::string | case_XAI () |
| xAI:OpenAI Chat Completions 互換形式 More... | |
| std::string | case_PFN () |
| PFN:OpenAI Chat Completions 互換形式 More... | |
| std::string | case_Kimi () |
| Kimi. More... | |
| std::string | case_Sakura () |
| Sakura:OpenAI Chat Completions 互換形式 More... | |
| std::string | case_DeepSeek () |
| DeepSeek 向けのリクエストJSONを生成する。 More... | |
| std::string | case_Ollama () |
| Ollama 向けのリクエストJSONを生成する。 More... | |
| std::string | case_OpenRouter () |
| OpenRouter:OpenAI Chat Completions 互換形式 More... | |
| std::string | case_LMStudio () |
| LM Studio:Ollama 互換形式 More... | |
| std::string | case_LLAMACPP () |
| llama.cpp:OpenAI Chat Completions 互換形式 More... | |
Public Member Functions inherited from GenerativeAI::AbstractVisitor< std::string > | |
| virtual | ~AbstractVisitor ()=default |
| virtual std::string | case_OpenAI () |
| std::string | visit (ProviderID provider) |
Public Attributes | |
| std::string | system_role |
| GenerativeAI::Model const & | model |
| std::string | prompt |
| bool | add_stream_false = false |
Static Public Attributes | |
| constexpr static float | temperature_ = 0.2f |
| 応答のランダム性(Anthropic以外で使用) More... | |
AIプロバイダーごとのリクエストJSONを生成するビジタークラス。
プロバイダー名とプロンプトを受け取り、各APIが要求するJSON形式に組み立てる。
|
inline |
|
inlinevirtual |
Anthropic Claude 向けのリクエストJSONを生成する。
Claude Opus 4.7(2026-04-16リリース)以降、temperature / top_p / top_k は 非推奨となりデフォルト以外の値を送ると HTTP 400 が返るため省略する。
Implements GenerativeAI::AbstractVisitor< std::string >.

|
inlinevirtual |
DeepSeek 向けのリクエストJSONを生成する。
streamingを無効化している点がOpenAI互換形式と異なる。
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
Google Gemini 向けのリクエストJSONを生成する。
Gemini API はモデル名をURLパラメータで指定するため、JSONに含まない。
Implements GenerativeAI::AbstractVisitor< std::string >.

|
inlinevirtual |
Kimi.
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
llama.cpp:OpenAI Chat Completions 互換形式
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
LM Studio:Ollama 互換形式
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
Ollama 向けのリクエストJSONを生成する。
Ollama は独自フォーマットで prompt キーにプロンプトを渡す。
Implements GenerativeAI::AbstractVisitor< std::string >.

|
inlinevirtual |
OpenAI Chat Completions API 向けのリクエストJSONを生成する。
Implements GenerativeAI::AbstractVisitor< std::string >.

|
inlinevirtual |
OpenAI Responses API 向けのリクエストJSONを生成する。
Implements GenerativeAI::AbstractVisitor< std::string >.

|
inlinevirtual |
OpenRouter:OpenAI Chat Completions 互換形式
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
PFN:OpenAI Chat Completions 互換形式
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
Sakura:OpenAI Chat Completions 互換形式
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
未知プロバイダー:空文字列を返す
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inlinevirtual |
xAI:OpenAI Chat Completions 互換形式
Implements GenerativeAI::AbstractVisitor< std::string >.
|
inline |

| bool _PromptJsonGenerator::add_stream_false = false |
| GenerativeAI::Model const& _PromptJsonGenerator::model |
| std::string _PromptJsonGenerator::prompt |
| std::string _PromptJsonGenerator::system_role |
|
staticconstexpr |
応答のランダム性(Anthropic以外で使用)