Loading...
Searching...
No Matches
opennn::ChatSession Class Reference
#include <opennn/network/chat.h>
Public Member Functions | |
| ChatSession (Transformer &) | |
| ChatSession (TextGenerationNetwork &) | |
| ChatSession (Network &, const TokenizerOperator &, unique_ptr< ChatTemplate >, unsigned long long seed=0) | |
| ~ChatSession () | |
| ChatSession (const ChatSession &)=delete | |
| ChatSession & | operator= (const ChatSession &)=delete |
| ChatResponse | send (string_view user_message, const ChatOptions &={}, const ChatCallback &={}) |
| void | attach_draft_model (Network &, Index draft_tokens=4) |
| void | chat (const ChatOptions &={}) |
| void | set_messages (const vector< ChatMessage > &) |
| const vector< ChatMessage > & | get_messages () const noexcept |
| void | clear () |
| void | trim () |
| ReasoningMode | resolve_reasoning_mode (ReasoningMode) const |
| SamplingConfig | default_sampling (ReasoningMode) const |
| const ForwardPropagation & | get_decode_propagation () const |
Static Public Attributes | |
| static constexpr Index | PREFILL_BLOCK_SIZE = 1024 |
Constructor & Destructor Documentation
◆ ChatSession() [1/4]
|
explicit |
◆ ChatSession() [2/4]
|
explicit |
◆ ChatSession() [3/4]
| opennn::ChatSession::ChatSession | ( | Network & | , |
| const TokenizerOperator & | , | ||
| unique_ptr< ChatTemplate > | , | ||
| unsigned long long | seed = 0 ) |
◆ ~ChatSession()
| opennn::ChatSession::~ChatSession | ( | ) |
◆ ChatSession() [4/4]
|
delete |
Member Function Documentation
◆ attach_draft_model()
| void opennn::ChatSession::attach_draft_model | ( | Network & | , |
| Index | draft_tokens = 4 ) |
◆ chat()
| void opennn::ChatSession::chat | ( | const ChatOptions & | = {} | ) |
◆ clear()
| void opennn::ChatSession::clear | ( | ) |
◆ default_sampling()
| SamplingConfig opennn::ChatSession::default_sampling | ( | ReasoningMode | ) | const |
◆ get_decode_propagation()
| const ForwardPropagation & opennn::ChatSession::get_decode_propagation | ( | ) | const |
◆ get_messages()
|
noexcept |
◆ operator=()
|
delete |
◆ resolve_reasoning_mode()
| ReasoningMode opennn::ChatSession::resolve_reasoning_mode | ( | ReasoningMode | ) | const |
◆ send()
| ChatResponse opennn::ChatSession::send | ( | string_view | user_message, |
| const ChatOptions & | = {}, | ||
| const ChatCallback & | = {} ) |
◆ set_messages()
| void opennn::ChatSession::set_messages | ( | const vector< ChatMessage > & | ) |
◆ trim()
| void opennn::ChatSession::trim | ( | ) |
Member Data Documentation
◆ PREFILL_BLOCK_SIZE
|
staticconstexpr |