Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add human and gpt-4o engines #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion agentboard/llm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
from .vllm import VLLM
from common.registry import registry
from .huggingface import HgModels
from .human import HUMAN

__all__ = [
"OPENAI_GPT",
"OPENAI_GPT_AZURE",
"VLLM",
"CLAUDE",
"HgModels"
"HgModels",
"HUMAN"
]


Expand Down
19 changes: 19 additions & 0 deletions agentboard/llm/human.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from common.registry import registry

@registry.register_llm("human")
class HUMAN:
def __init__(self):
self.engine = "human"
self.context_length = 100000000
self.max_tokens = 10000

def generate(self, system_message, prompt):
return True, input("")

def num_tokens_from_messages(self, messages, model="gpt-3.5-turbo-0613"):
"""Return the number of tokens used by a list of messages."""
return 0

@classmethod
def from_config(cls, config):
return cls()
16 changes: 16 additions & 0 deletions eval_configs/main_results_all_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ agent:
need_goal: True

llm:
human:
name: human
engine: human
context_length: 128000
use_parser: False
gpt-4o:
name: gpt
engine: gpt-4o
context_length: 128000 # 4096
use_azure: False
temperature: 0.
top_p: 1
retry_delays: 20
max_retry_iters: 15
stop: "\n"
use_parser: False
gpt-3.5-turbo-16k:
name: gpt
engine: gpt-3.5-turbo-16k
Expand Down