MCPcopy Create free account
hub / github.com/LangGraph-GUI/LangGraph-GUI-backend / main

Function main

src/run_graph.py:8–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6from WorkFlow import run_workflow_as_server
7
8def 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
37if __name__ == "__main__":
38 main()

Callers 1

run_graph.pyFile · 0.85

Calls 2

get_llmFunction · 0.90
run_workflow_as_serverFunction · 0.90

Tested by

no test coverage detected