diff --git a/utils/common.py b/utils/common.py index bfb77f11..473d8c75 100644 --- a/utils/common.py +++ b/utils/common.py @@ -10,7 +10,7 @@ import traceback import context -from .constants import OPENAI_API_KEY, TENDERLY_FORK_URL +from .constants import OPENAI_API_KEY, OPENAI_ORGANIZATION, TENDERLY_FORK_URL with open(f"{os.getcwd()}/knowledge_base/functions.json", 'r') as f: @@ -19,7 +19,9 @@ def set_api_key(): os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY + os.environ["OPENAI_ORGANIZATION"] = OPENAI_ORGANIZATION OpenAI.api_key = OPENAI_API_KEY + OpenAI.organization = OPENAI_ORGANIZATION w3 = Web3(Web3.HTTPProvider(TENDERLY_FORK_URL)) diff --git a/utils/constants.py b/utils/constants.py index e85107e0..da7e0798 100644 --- a/utils/constants.py +++ b/utils/constants.py @@ -3,6 +3,7 @@ HUGGINGFACE_API_KEY = "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" HUGGINGFACE_INFERENCE_ENDPOINT = "https://xczbh8zf5amwxdlc.us-east-1.aws.endpoints.huggingface.cloud" # may vary OPENAI_API_KEY = "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" +OPENAI_ORGANIZATION = "org-mrK2kSCEDDLFwshwzA1wjEBX" CENTER_API_KEY = os.getenv('CENTER_API_KEY', 'key8f1af05afe473107c3ea2556') ETHERSCAN_API_KEY = 'ZCUTVCPHAJ5YRNB6SZTJN9ZV24FBEX86GJ' OPENSEA_API_KEY = os.getenv('OPENSEA_API_KEY', '') @@ -12,4 +13,4 @@ DEFAULT_MAINNET_FORK_ID = "08f78838-4799-47a8-88fb-1f169fa99f57" TENDERLY_FORK_URL = f"{TENDERLY_FORK_BASE_URL}/{DEFAULT_MAINNET_FORK_ID}" -TEST_TENDERLY_FORK_ID = os.getenv('TEST_TENDERLY_FORK_ID', "") \ No newline at end of file +TEST_TENDERLY_FORK_ID = os.getenv('TEST_TENDERLY_FORK_ID', "")