MCPcopy Create free account
hub / github.com/llm-attacks/llm-attacks / load_prompts

Function load_prompts

api_experiments/evaluate_api_models.py:79–88  ·  view source on GitHub ↗
(instruction, instructions_path)

Source from the content-addressed store, hash-verified

77 time.sleep(10)
78
79def 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
91def load_chatbot(*, model_name, configs, add_system_prompt=True):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected