-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
34 lines (26 loc) · 721 Bytes
/
Copy pathtest.py
File metadata and controls
34 lines (26 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import argparse
from model import get_llm
def main():
# Set up argument parser
parser = argparse.ArgumentParser(description="Test different LLM models.")
parser.add_argument(
"-m",
"--model",
type=str,
required=True,
help="Specify the model to use: 'openai', 'llama2', or 'breeze'.",
)
args = parser.parse_args()
# Get the LLM
llm_type = args.model
llm = get_llm(llm_type)
# Input prompt
prompt = "Answer only yes or no. Is apple red?"
# Generate the output
print("\nGenerating output...\n")
output = llm(prompt)
# Display the output
print("Model Output:")
print(output)
if __name__ == "__main__":
main()