()
| 6 | from WorkFlow import run_workflow_as_server |
| 7 | |
| 8 | def main(): |
| 9 | # Create the argument parser |
| 10 | parser = argparse.ArgumentParser(description="Run a graph processing task with LLM configuration.") |
| 11 | |
| 12 | # Add arguments |
| 13 | parser.add_argument( |
| 14 | "--llm", |
| 15 | type=str, |
| 16 | required=True, |
| 17 | help="Specify the LLM model to use (e.g., gpt-4)." |
| 18 | ) |
| 19 | parser.add_argument( |
| 20 | "--key", |
| 21 | type=str, |
| 22 | required=True, |
| 23 | help="API key for authentication." |
| 24 | ) |
| 25 | |
| 26 | # Parse the arguments |
| 27 | args = parser.parse_args() |
| 28 | |
| 29 | # Access the arguments |
| 30 | llm_model = args.llm |
| 31 | api_key = args.key |
| 32 | |
| 33 | # Initialize the LLM using the provided model and API key |
| 34 | llm_instance = get_llm(llm_model, api_key) |
| 35 | run_workflow_as_server(llm_instance) |
| 36 | |
| 37 | if __name__ == "__main__": |
| 38 | main() |
no test coverage detected