Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
steventkrawczyk committed Jul 26, 2023
1 parent 02340ba commit 1857168
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/notebooks/GPT4RegressionTesting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
" \"\"\"\n",
"You are a math tutor. When given a math question, talk through each step \n",
"of your thought process before arriving at the answer. \n",
"\"\"\"\n",
"\"\"\",\n",
"]\n",
"inputs = [\n",
" \"\"\"\n",
Expand Down
32 changes: 11 additions & 21 deletions examples/notebooks/OpenAIChatExperiment.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/prompttests/test_huggingface_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_prompt():
prompts=[create_prompt()],
expected=["George Washington"],
threshold=1.0,
threshold_type=ThresholdType.MAXIMUM
threshold_type=ThresholdType.MAXIMUM,
)
def completion_fn(prompt: str):
response = None
Expand Down
1 change: 0 additions & 1 deletion prompttools/experiment/experiments/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ def to_markdown(self):
print(markdown)
return markdown


def _get_model_names(self):
pass

Expand Down
2 changes: 1 addition & 1 deletion prompttools/utils/autoeval_from_expected.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def compute(prompt: str, expected: str, response: str, model: str = "gpt-4") ->
raise PromptToolsUtilityError
evaluation = openai.ChatCompletion.create(model=model, messages=_get_messages(prompt, expected, response))
return 1.0 if "RIGHT" in evaluation["choices"][0]["message"]["content"] else 0.0


def evaluate(prompt: str, response: str, metadata: Dict, expected: str) -> float:
r"""
Expand Down
2 changes: 1 addition & 1 deletion scripts/create_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

markdown = openai_experiment.to_markdown()
with open(PROMPTTOOLS_MD_TMP, "w") as f:
f.write(markdown)
f.write(markdown)

0 comments on commit 1857168

Please sign in to comment.