(instruction, instructions_path)
| 77 | time.sleep(10) |
| 78 | |
| 79 | def load_prompts(instruction, instructions_path): |
| 80 | if instruction is not None: |
| 81 | assert isinstance(instruction, str), "question must be a string." |
| 82 | instructions = [instruction] |
| 83 | else: |
| 84 | with open(instructions_path, 'r') as f: |
| 85 | instructions = f.readlines() |
| 86 | f.close() |
| 87 | |
| 88 | return instructions |
| 89 | |
| 90 | |
| 91 | def load_chatbot(*, model_name, configs, add_system_prompt=True): |