mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-06 14:22:46 +02:00
update comment
This commit is contained in:
parent
6f84110e0f
commit
faeee22dcb
1 changed files with 12 additions and 2 deletions
|
|
@ -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__,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue