Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openai: add organization #131

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '')
Expand All @@ -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', "")
TEST_TENDERLY_FORK_ID = os.getenv('TEST_TENDERLY_FORK_ID', "")