-
Notifications
You must be signed in to change notification settings - Fork 34
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
Benchmark and deploy mech tools #167
Conversation
@@ -1138,7 +1139,7 @@ def run(**kwargs) -> Tuple[str, Optional[str], Optional[Dict[str, Any]], Any]: | |||
engine = TOOL_TO_ENGINE[tool] | |||
|
|||
# Extract the event question from the prompt | |||
event_question = re.search(r"\"(.+?)\"", prompt).group(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regex search often returns None, causing exception
@@ -303,7 +304,6 @@ def fetch_additional_information( | |||
json_data["queries"], | |||
api_key=google_api_key, | |||
engine=google_engine, | |||
num_urls=num_urls, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bugfix
@@ -60,7 +60,8 @@ def count_tokens(text: str, model: str) -> int: | |||
|
|||
|
|||
NUM_URLS_EXTRACT = 5 | |||
DEFAULT_NUM_WORDS: Dict[str, Optional[int]] = defaultdict(lambda: 300) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bugfix
@@ -202,7 +203,7 @@ def get_urls_from_queries(queries: List[str], api_key: str, engine: str) -> List | |||
query=query, | |||
api_key=api_key, | |||
engine=engine, | |||
num=3, # Number of returned results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 or NUM_URLS_EXTRACT==5
? Hmm, let's use global var
Oops, base branch was meant to be my fork! |
Add PMAT dependency and add scripts for benchmarking and deploying mech tools