janus.parsers.eval_parser#

Attributes#

log

Classes#

Module Contents#

janus.parsers.eval_parser.log#
class janus.parsers.eval_parser.Eval#

Bases: langchain_core.pydantic_v1.BaseModel

syntax: float#
style: float#
completeness: float#
correctness: float#
score_is_valid(v)#
Parameters:

v (float | int) –

class janus.parsers.eval_parser.EvaluationParser#

Bases: janus.parsers.parser.JanusParser, langchain.output_parsers.PydanticOutputParser

parse(text)#
Parameters:

text (str | langchain_core.messages.BaseMessage) –

Return type:

str

parse_combined_output(text)#

Parse the JSON object, convert keys to lowercase, filter out unexpected keys, and average the values

Parameters:

text (str) – The output text from the LLM.

Returns:

A parsed version of the text.

Return type:

str