Skip to content

Commit

Permalink
update bleu corpus level and gpt 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenshansilvia committed Oct 2, 2024
1 parent 996c6e7 commit d035642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rageval/utils/check_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ def text_to_sents(text: str, model_name="nltk") -> List[str]:
sentences = [s.strip() for s in sentences if len(s.strip()) >= 3]

elif model_name == "gpt-3.5-turbo":
model = OpenAILLM("gpt-3.5-turbo-16k", "OPENAI_API_KEY") # pragma: no cover
model = OpenAILLM("gpt-3.5-turbo", "OPENAI_API_KEY") # pragma: no cover
prompt = DOC_TO_SENTENCES_PROMPT # pragma: no cover
input_str = prompt.format(doc=text).strip() # pragma: no cover
r = model.generate([input_str]) # pragma: no cover
sentences = eval(r) # pragma: no cover
else:
logger.info("The parameter `model_name` should be in [`nltk`, `gpt-3.5-turbo-16k`]. ") # pragma: no cover
logger.info("The parameter `model_name` should be in [`nltk`, `gpt-3.5-turbo`]. ") # pragma: no cover
assert isinstance(sentences, list)

return sentences
Expand Down

0 comments on commit d035642

Please sign in to comment.