mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-01 11:56:24 +02:00
Update AGS
This commit is contained in:
parent
9f8f0a27fd
commit
8f1cf58af2
11 changed files with 918 additions and 0 deletions
12
test.py
Normal file
12
test.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import asyncio
|
||||
from examples.ags.w_action_node.graph import HumanEvalGraph
|
||||
from metagpt.llm import LLM
|
||||
|
||||
human_eval_example = """
|
||||
from typing import List\n\n\ndef has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\" Check if in given list of numbers, are any two numbers closer to each other than\n given threshold.\n >>> has_close_elements([1.0, 2.0, 3.0], 0.5)\n False\n >>> has_close_elements([1.0, 2.8, 3.0, 4.0, 5.0, 2.0], 0.3)\n True\n \"\"\"\n
|
||||
"""
|
||||
|
||||
solver = HumanEvalGraph(name="solver", llm=LLM(), criteria='correctness, efficiency, readability')
|
||||
|
||||
final_result = asyncio.run(solver(human_eval_example))
|
||||
print(final_result)
|
||||
Loading…
Add table
Add a link
Reference in a new issue