mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-30 19:36:24 +02:00
experience pool
This commit is contained in:
parent
5c416a1f31
commit
15b86e8533
10 changed files with 106 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
"""class tools, including method inspection, class attributes, inheritance relationships, etc."""
|
||||
import inspect
|
||||
|
||||
|
||||
def check_methods(C, *methods):
|
||||
|
|
@ -16,3 +17,11 @@ def check_methods(C, *methods):
|
|||
else:
|
||||
return NotImplemented
|
||||
return True
|
||||
|
||||
|
||||
def get_func_full_name(func, *args) -> str:
|
||||
if inspect.ismethod(func) or (inspect.isfunction(func) and "self" in inspect.signature(func).parameters):
|
||||
cls_name = args[0].__class__.__name__
|
||||
return f"{func.__module__}.{cls_name}.{func.__name__}"
|
||||
|
||||
return f"{func.__module__}.{func.__name__}"
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@ TOKEN_MAX = {
|
|||
"gpt-4-1106-preview": 128000,
|
||||
"gpt-4-vision-preview": 128000,
|
||||
"gpt-4-1106-vision-preview": 128000,
|
||||
"gpt-4-turbo": 128000,
|
||||
"gpt-4o": 128000,
|
||||
"gpt-4": 8192,
|
||||
"gpt-4-0613": 8192,
|
||||
"gpt-4-32k": 32768,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue