flexeval.classes.message#

Classes

Message(**kwargs)

Holds a single component of a single turn Corresponds to one output of a node in LangGraph or one Turn in jsonl

class flexeval.classes.message.Message(**kwargs)[source]#

Bases: BaseModel

Holds a single component of a single turn Corresponds to one output of a node in LangGraph or one Turn in jsonl

completion_tokens = <IntegerField: Message.completion_tokens>#
content = <TextField: Message.content>#
context = <TextField: Message.context>#
dataset = <ForeignKeyField: Message.dataset>#
format_input_for_rubric()[source]#
get_completion(include_system_prompt=False, completion_config: dict | None = None, evalsetrun=None)[source]#
get_content() str[source]#
get_context(include_system_prompt=False) list[dict[str, str]][source]#
get_formatted_prompt(include_system_prompt=False) list[dict[str, str]][source]#
id = <IntegerField: Message.id>#
index_in_thread = <IntegerField: Message.index_in_thread>#
is_final_turn_in_input = <BooleanField: Message.is_final_turn_in_input>#
is_flexeval_completion = <BooleanField: Message.is_flexeval_completion>#
langgraph_checkpoint = <TextField: Message.langgraph_checkpoint>#
langgraph_checkpoint_id = <TextField: Message.langgraph_checkpoint_id>#
langgraph_invocation_id = <TextField: Message.langgraph_invocation_id>#
langgraph_message_type = <TextField: Message.langgraph_message_type>#
langgraph_metadata = <TextField: Message.langgraph_metadata>#
langgraph_node = <TextField: Message.langgraph_node>#
langgraph_parent_checkpoint_id = <TextField: Message.langgraph_parent_checkpoint_id>#
langgraph_print = <TextField: Message.langgraph_print>#
langgraph_step = <IntegerField: Message.langgraph_step>#
langgraph_thread_id = <TextField: Message.langgraph_thread_id>#
langgraph_ts = <TextField: Message.langgraph_ts>#
langgraph_type = <TextField: Message.langgraph_type>#
metadata = <TextField: Message.metadata>#
metadata_dict#

Descriptor that provides dict-like access to a JSON text field.

Example: class SomeModel(pw.Model):

some_field = pw.TextField(default=”{}”) some_field_dict = JsonView(text_field_attr_name=”some_field”)

metrics_list#

!! processed by numpydoc !!

model_name = <TextField: Message.model_name>#
n_tool_calls = <IntegerField: Message.n_tool_calls>#
prompt_tokens = <IntegerField: Message.prompt_tokens>#
role = <TextField: Message.role>#
system_prompt = <TextField: Message.system_prompt>#
thread = <ForeignKeyField: Message.thread>#
tool_call_ids = <TextField: Message.tool_call_ids>#
tool_callslanggraph_print = <TextField: Message.tool_callslanggraph_print>#
toolcalls#

!! processed by numpydoc !!

turn = <ForeignKeyField: Message.turn>#