ember.cpp 0.1.0
C++ inference engine for Llama-family and paperkiln models (CPU, CUDA, WebAssembly)
Loading...
Searching...
No Matches
microtorch::chat::Message Struct Reference

#include <chat_template.h>

Collaboration diagram for microtorch::chat::Message:
Collaboration graph

Public Member Functions

 Message ()=default
 
 Message (std::string r, std::string c, int l=-1)
 

Public Attributes

std::string role
 
std::string content
 
int loss = -1
 
bool has_tool_calls = false
 
std::vector< ToolCall > tool_calls
 
bool has_tool_call_id = false
 
std::string tool_call_id
 
bool tool_call_id_null = false
 

Detailed Description

Definition at line 357 of file chat_template.h.

Constructor & Destructor Documentation

◆ Message() [1/2]

microtorch::chat::Message::Message ( )
default

◆ Message() [2/2]

microtorch::chat::Message::Message ( std::string  r,
std::string  c,
int  l = -1 
)
inline

Definition at line 367 of file chat_template.h.

367: role(std::move(r)), content(std::move(c)), loss(l) {}
float c
size_t j

Member Data Documentation

◆ content

std::string microtorch::chat::Message::content

Definition at line 358 of file chat_template.h.

◆ has_tool_call_id

bool microtorch::chat::Message::has_tool_call_id = false

Definition at line 362 of file chat_template.h.

◆ has_tool_calls

bool microtorch::chat::Message::has_tool_calls = false

Definition at line 360 of file chat_template.h.

◆ loss

int microtorch::chat::Message::loss = -1

Definition at line 359 of file chat_template.h.

◆ role

std::string microtorch::chat::Message::role

Definition at line 358 of file chat_template.h.

Referenced by microtorch::chat::messages_from_json().

◆ tool_call_id

std::string microtorch::chat::Message::tool_call_id

Definition at line 363 of file chat_template.h.

◆ tool_call_id_null

bool microtorch::chat::Message::tool_call_id_null = false

Definition at line 364 of file chat_template.h.

◆ tool_calls

std::vector<ToolCall> microtorch::chat::Message::tool_calls

Definition at line 361 of file chat_template.h.


The documentation for this struct was generated from the following file: