Commit 28b8fa4d authored by Your Name's avatar Your Name

Fix order - import from text.py before calling set_global_args

parent 5b5776d2
...@@ -45,10 +45,7 @@ def main(): ...@@ -45,10 +45,7 @@ def main():
download_model, download_model,
) )
# Store args globally for access in endpoints # Import global setters from text module FIRST (before calling them)
set_global_args(args)
# Import global setters from text module
from codai.api.text import ( from codai.api.text import (
set_global_args, set_global_args,
set_global_debug, set_global_debug,
...@@ -57,6 +54,9 @@ def main(): ...@@ -57,6 +54,9 @@ def main():
) )
from codai.api.app import set_load_mode from codai.api.app import set_load_mode
# Store args globally for access in endpoints (both state and text.py)
set_global_args(args)
# Set global variables # Set global variables
global global_system_prompt, global_tools_closer_prompt, global_debug, global_dump, global_file_path, grammar_guided_gen global global_system_prompt, global_tools_closer_prompt, global_debug, global_dump, global_file_path, grammar_guided_gen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment