Skip to content

Commit

Permalink
Apply yapf
Browse files Browse the repository at this point in the history
  • Loading branch information
Alnusjaponica committed Mar 18, 2024
1 parent 61b709a commit 3ef3b14
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/langcheck/metrics/en/reference_free_text_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@


def sentiment(
generated_outputs: List[str] | str,
prompts: Optional[List[str] | str] = None,
model_type: str = 'local',
openai_client: Optional[OpenAI] = None,
openai_args: Optional[Dict[str, str]] = None,
local_overflow_strategy: str = 'truncate',
*,
use_async: bool = False,
generated_outputs: List[str] | str,
prompts: Optional[List[str] | str] = None,
model_type: str = 'local',
openai_client: Optional[OpenAI] = None,
openai_args: Optional[Dict[str, str]] = None,
local_overflow_strategy: str = 'truncate',
*,
use_async: bool = False,
) -> MetricValue[Optional[float]]:
'''Calculates the sentiment scores of generated outputs. This metric takes
on float values between [0, 1], where 0 is negative sentiment and 1 is
Expand Down Expand Up @@ -413,14 +413,14 @@ def _function_call_prompt(long_assessment: str) -> str:


def toxicity(
generated_outputs: List[str] | str,
prompts: Optional[List[str] | str] = None,
model_type: str = 'local',
openai_client: Optional[OpenAI] = None,
openai_args: Optional[Dict[str, str]] = None,
local_overflow_strategy: str = 'truncate',
*,
use_async=False,
generated_outputs: List[str] | str,
prompts: Optional[List[str] | str] = None,
model_type: str = 'local',
openai_client: Optional[OpenAI] = None,
openai_args: Optional[Dict[str, str]] = None,
local_overflow_strategy: str = 'truncate',
*,
use_async=False,
) -> MetricValue[Optional[float]]:
'''Calculates the toxicity scores of generated outputs. This metric takes on
float values between [0, 1], where 0 is low toxicity and 1 is high toxicity.
Expand Down

0 comments on commit 3ef3b14

Please sign in to comment.