Skip to content

Commit daa30c9

Browse files
committed
feat: minor fix to parser
1 parent 6c9f02a commit daa30c9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/prompt_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
prompt_selection = PromptSelection(
1515
model=model, num_responses=10, diversity_measure=diversity_measure, selection="min"
1616
)
17-
selected_prompt, selected_diversity, info = prompt_selection.generate(
17+
selected_prompt, selected_diversity = prompt_selection.generate(
1818
[
1919
"At the end, say 'the answer is [put the concatenated word here]'.\nQuestion: Take the last letter of each word in \"Tal Evan Lesley Sidney\" and concatenate them..",
2020
"At the end, say 'the answer is [put the concatenated word here]'.\nQuestion: Concatenate the last letter of each word in \"Tal Evan Lesley Sidney\".",

langdiversity/parser/answer_extractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def extract_math_answer(response: str):
3030
try: responses.append(eval(r))
3131
except: pass
3232

33-
return set(responses)
33+
return frozenset(responses)
3434

3535

3636
def extract_multi_choice_answer(response: str):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
setup(
99
name='langdiversity',
1010
packages=find_packages(exclude=['tests']),
11-
version='0.0.2',
11+
version='0.0.3',
1212
description='A tool to elevate your language models with insightful diversity metrics.',
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)