Skip to content

Commit

Permalink
Fix hf example
Browse files Browse the repository at this point in the history
  • Loading branch information
steventkrawczyk committed Jul 24, 2023
1 parent 71ae416 commit 0bd6ecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file added examples/.DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion examples/prompttests/test_huggingface_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import jinja2
import prompttools.prompttest as prompttest
from prompttools.utils import similarity

from prompttools.prompttest.threshold_type import ThresholdType
from prompttools.mock.mock import mock_hf_completion_fn
from huggingface_hub.inference_api import InferenceApi

Expand Down Expand Up @@ -37,6 +37,8 @@ def create_prompt():
eval_fn=similarity.evaluate,
prompts=[create_prompt()],
expected=["George Washington"],
threshold=1.0,
threshold_type=ThresholdType.MAXIMUM
)
def completion_fn(prompt: str):
response = None
Expand Down

0 comments on commit 0bd6ecf

Please sign in to comment.