File size: 744 Bytes
97ff70a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import argparse
from src.lab_assistant.mllm_chatbot import MLLM_ChatBot
from src.lab_assistant.functions_definition import functions_definition

def main(model: str):
    bot = MLLM_ChatBot(model=model, helper_functions=functions_definition)
    print("Chat is ready. Type your message and press Enter. Ctrl+C to exit.")
    while True:
        try:
            user = input("> ").strip()
            if not user:
                continue
            bot.chat(user_input=user, output_mode="text")
        except KeyboardInterrupt:
            print("\nBye.")
            break

if __name__ == "__main__":
    p = argparse.ArgumentParser()
    p.add_argument("--model", type=str, default="gpt-4o")
    args = p.parse_args()
    main(args.model)