Skip to content

Commit

Permalink
Update chatbot_comparator.py
Browse files Browse the repository at this point in the history
Adding doctoring to visualize method for comparison
  • Loading branch information
largelanguagemodels authored Sep 13, 2023
1 parent 80e701d commit 55e7c0a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pykoi/component/chatbot_comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, models: List[AbsLlm], **kwargs):
"latency",
"length_in_tokens",
]
) # Added this line
)

def add(self, model: AbsLlm):
"""
Expand Down Expand Up @@ -118,5 +118,13 @@ def inference(self, questions: List[str]):
return self.inference_results

def visualize(self):
"""
Visualize the inference results using a bar chart.
Returns
-------
object
A Barchart visualization with the inference results.
"""
records = df_to_js_array(self.inference_results)
return Barchart()(data=records)

0 comments on commit 55e7c0a

Please sign in to comment.