mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-11 15:24:16 +00:00
cleanup
This commit is contained in:
parent
1517105c3a
commit
45ddfa2dd0
@ -75,6 +75,7 @@ def config_list_openai_aoai(
|
|||||||
"""
|
"""
|
||||||
if "OPENAI_API_KEY" not in os.environ and exclude != "openai":
|
if "OPENAI_API_KEY" not in os.environ and exclude != "openai":
|
||||||
try:
|
try:
|
||||||
|
print(f"{key_file_path}/{openai_api_key_file}")
|
||||||
with open(f"{key_file_path}/{openai_api_key_file}") as key_file:
|
with open(f"{key_file_path}/{openai_api_key_file}") as key_file:
|
||||||
os.environ["OPENAI_API_KEY"] = key_file.read().strip()
|
os.environ["OPENAI_API_KEY"] = key_file.read().strip()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|||||||
@ -19,7 +19,7 @@ def run_notebook(input_nb, output_nb="executed_openai_notebook.ipynb", save=Fals
|
|||||||
from nbconvert.preprocessors import CellExecutionError
|
from nbconvert.preprocessors import CellExecutionError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
nb_loc = os.path.join(here, os.pardir, os.pardir, "notebook")
|
nb_loc = os.path.join(here, os.pardir, "notebook")
|
||||||
file_path = os.path.join(nb_loc, input_nb)
|
file_path = os.path.join(nb_loc, input_nb)
|
||||||
with open(file_path) as nb_file:
|
with open(file_path) as nb_file:
|
||||||
nb = nbformat.read(nb_file, as_version=4)
|
nb = nbformat.read(nb_file, as_version=4)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user