(*, model_name, configs, add_system_prompt=True)
| 89 | |
| 90 | |
| 91 | def load_chatbot(*, model_name, configs, add_system_prompt=True): |
| 92 | if model_name in ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-0314']: |
| 93 | chatbot = OpenaiModel(model_name=model_name, add_system_prompt=add_system_prompt) |
| 94 | return chatbot, configs |
| 95 | elif model_name in ['claude-2', 'claude-instant-1']: |
| 96 | chatbot = AnthropicModel(model_name=model_name) |
| 97 | return chatbot, configs |
| 98 | else: |
| 99 | raise NotImplementedError(f"We do not have API keys for {model_name}.") |
| 100 | |
| 101 | |
| 102 | def combine_prompts(benign, adv, combo='benign+adv'): |
no test coverage detected