Skip to content

Commit

Permalink
runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshk-18 committed Jul 23, 2023
1 parent 8cd261b commit 5c1466e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chatgptxblock/chatgptxblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def __init__(self, *args, **kwargs):

# Accessing the configuration data from XBlock runtime
xblock_config = self.runtime.handler_env['xblock'].runtime.get_user_state('XBLOCK_CONFIG')
this.a_key = xblock_config.get('OPENAI_KEY')
print(this.a_key)
self.a_key = xblock_config.get('OPENAI_KEY')
print(self.a_key)
display_name = String(
display_name="Display Name",
help="Display name for this module",
Expand All @@ -52,7 +52,7 @@ def __init__(self, *args, **kwargs):
)

api_key = String(
default=this.a_key,
default=a_key,
scope=Scope.settings,
help="Your OpenAI API key, which can be found at <a href='https://platform.openai.com/account/api-keys' target='_blank'>https://platform.openai.com/account/api-keys</a>",
)
Expand Down

0 comments on commit 5c1466e

Please sign in to comment.