大模型接口远程访问
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

31 lines
999 B

  1. from chatGPT_Web import format_skill_list_movie
  2. def test_happy_path_list_not_empty():
  3. list = {"key1": "value1", "key2": "value2"}
  4. msg = "This is a message"
  5. expected_result = 'answer only in a mark down cell, find the closest sentence . The format is\n' + \
  6. '"""\n' + \
  7. '[{"msg": <sentence>}]\n' + \
  8. '"""\n' + \
  9. 'Returns Null if there is no matching sentence.The format is\n' + \
  10. '"""\n' + \
  11. '[{"msg":"Null"}]\n' + \
  12. '"""\n' + \
  13. '我提供的句子如下:\n' + \
  14. '[{1、key1},{2、key2},]' + \
  15. '不附加说明和解释的文字。\n' + \
  16. 'my paragraph is:\n"""This is a message"""'
  17. print(expected_result)
  18. print("=====================================")
  19. format_skill_list_movie(list, msg)
  20. print("=====================================")
  21. assert format_skill_list_movie(list, msg) == expected_result
  22. if __name__ == '__main__':
  23. test_happy_path_list_not_empty()