From faeee22dcb445ba485149d055756324a0950e5fc Mon Sep 17 00:00:00 2001 From: seehi <6580@pm.me> Date: Fri, 7 Jun 2024 10:30:37 +0800 Subject: [PATCH] update comment --- metagpt/exp_pool/scorers/simple.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/metagpt/exp_pool/scorers/simple.py b/metagpt/exp_pool/scorers/simple.py index d0301cbc2..5779f7fb1 100644 --- a/metagpt/exp_pool/scorers/simple.py +++ b/metagpt/exp_pool/scorers/simple.py @@ -1,4 +1,5 @@ -"""Evalate by llm.""" +"""Simple Scorer.""" + import inspect import json from typing import Any, Callable @@ -57,8 +58,17 @@ class SimpleScorer(ExperienceScorer): llm: BaseLLM = Field(default_factory=LLM) async def evaluate(self, func: Callable, result: Any, args: tuple = None, kwargs: dict = None) -> Score: - """Evaluate the quality of content.""" + """Evaluates the quality of content by LLM. + Args: + func: The function to evaluate. + result: The result produced by the function. + args: The positional arguments used when calling the function, if any. + kwargs: The keyword arguments used when calling the function, if any. + + Returns: + A Score object containing the evaluation results. + """ prompt = SIMPLE_SCORER_TEMPLATE.format( func_name=func.__name__, func_doc=func.__doc__,