fix(spec):

This commit is contained in:
Alexander Myasoedov
2024-04-25 21:42:04 +03:00
parent 4f4da2f136
commit 5855139d9c
2 changed files with 5 additions and 5 deletions
-1
View File
@@ -1,4 +1,3 @@
import httpx
from pydantic import BaseModel
+5 -4
View File
@@ -30,11 +30,12 @@ REFUSAL_MARKS = [
]
def check_refusal(response, refusal_phrases=REFUSAL_MARKS):
"""Check if the LLM's response contains any of the refusal phrases.
def check_refusal(response: str, refusal_phrases: list = REFUSAL_MARKS) -> bool:
"""
Check if the response contains any phrases indicating refusal to answer.
Parameters:
- response (str): The LLM's response to a prompt.
Args:
- response (str): The response from the language model.
- refusal_phrases (list): A list of phrases indicating refusal to answer.
Returns: