ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
options.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (c) 2026 ForestHub. All rights reserved.
3// For commercial licensing, visit https://github.com/ForestHubAI/fh-sdk
4
5#ifndef FORESTHUB_CORE_OPTIONS_HPP
6#define FORESTHUB_CORE_OPTIONS_HPP
7
10
12
13namespace foresthub {
14namespace core {
15
17struct Options {
25
28 this->max_tokens = max_tokens;
29 return *this;
30 }
31
34 this->temperature = temperature;
35 return *this;
36 }
37
40 this->top_k = top_k;
41 return *this;
42 }
43
46 this->top_p = top_p;
47 return *this;
48 }
49
52 this->frequency_penalty = frequency_penalty;
53 return *this;
54 }
55
58 this->presence_penalty = presence_penalty;
59 return *this;
60 }
61
64 this->seed = seed;
65 return *this;
66 }
67};
68
69} // namespace core
70} // namespace foresthub
71
72#endif // FORESTHUB_CORE_OPTIONS_HPP
Core abstractions: requests, responses, tools, input types, and provider interface.
Top-level namespace for the ForestHub SDK.
Minimal Optional<T> polyfill for C++14 compatibility.
Minimal Optional<T> polyfill for C++14 compatibility.
Definition optional.hpp:21
Model-specific generation options.
Definition options.hpp:17
Options & WithFrequencyPenalty(float frequency_penalty)
Set the frequency penalty.
Definition options.hpp:51
Options & WithMaxTokens(int max_tokens)
Set the maximum number of tokens to generate.
Definition options.hpp:27
Options & WithSeed(int seed)
Set the random seed for deterministic output.
Definition options.hpp:63
Options & WithPresencePenalty(float presence_penalty)
Set the presence penalty.
Definition options.hpp:57
foresthub::Optional< int > max_tokens
Maximum tokens to generate.
Definition options.hpp:18
Options & WithTopP(float top_p)
Set the nucleus sampling cutoff.
Definition options.hpp:45
foresthub::Optional< float > frequency_penalty
Reduces repetition.
Definition options.hpp:22
Options & WithTopK(int top_k)
Set the top-k sampling limit.
Definition options.hpp:39
Options & WithTemperature(float temperature)
Set the sampling temperature.
Definition options.hpp:33
foresthub::Optional< float > temperature
Randomness (0.0 to 1.0).
Definition options.hpp:19
foresthub::Optional< float > presence_penalty
Encourages new concepts.
Definition options.hpp:23
foresthub::Optional< int > top_k
Maximum tokens to consider.
Definition options.hpp:20
foresthub::Optional< int > seed
Seed for deterministic generation.
Definition options.hpp:24
foresthub::Optional< float > top_p
Nucleus sampling cutoff.
Definition options.hpp:21