Skip to content

Commit 76d3775

Browse files
fix: fix 'api key is not none' error
1 parent 6e7fa95 commit 76d3775

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

graphgen/graphgen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def __post_init__(self):
6969
self.tokenizer_instance: Tokenizer = Tokenizer(
7070
model_name=self.config["tokenizer"]
7171
)
72-
print(os.getenv("SYNTHESIZER_MODEL"), os.getenv("SYNTHESIZER_API_KEY"))
7372
self.synthesizer_llm_client: OpenAIModel = OpenAIModel(
7473
model_name=os.getenv("SYNTHESIZER_MODEL"),
7574
api_key=os.getenv("SYNTHESIZER_API_KEY"),

webui/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
def init_graph_gen(config: dict, env: dict) -> GraphGen:
3838
# Set up working directory
3939
log_file, working_dir = setup_workspace(os.path.join(root_dir, "cache"))
40-
4140
set_logger(log_file, if_stream=True)
42-
graph_gen = GraphGen(working_dir=working_dir, config=config)
41+
os.environ.update({k: str(v) for k, v in env.items()})
4342

43+
graph_gen = GraphGen(working_dir=working_dir, config=config)
4444
# Set up LLM clients
4545
graph_gen.synthesizer_llm_client = OpenAIModel(
4646
model_name=env.get("SYNTHESIZER_MODEL", ""),

0 commit comments

Comments
 (0)