Class: LlamaCpp::LlamaChatMessage

Inherits:
Object
  • Object
show all
Defined in:
ext/llama_cpp/llama_cpp.c,
ext/llama_cpp/llama_cpp.c

Overview

“struct llama_chat_message” wrapper class

Instance Method Summary collapse

Instance Method Details

#contentString

Returns:

  • (String)


1085
1086
1087
1088
# File 'ext/llama_cpp/llama_cpp.c', line 1085

static VALUE llama_chat_message_get_content(VALUE self) {
  llama_chat_message* data = get_llama_chat_message(self);
  return rb_utf8_str_new_cstr(data->content);
}

#roleString

Returns:

  • (String)


1080
1081
1082
1083
# File 'ext/llama_cpp/llama_cpp.c', line 1080

static VALUE llama_chat_message_get_role(VALUE self) {
  llama_chat_message* data = get_llama_chat_message(self);
  return rb_utf8_str_new_cstr(data->role);
}