From a60d2878a11d11f4648cac2413c15a297143f51a Mon Sep 17 00:00:00 2001 From: lokeshk-incresco Date: Sun, 23 Jul 2023 15:40:39 +0530 Subject: [PATCH] runtime --- chatgptxblock/chatgptxblock.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chatgptxblock/chatgptxblock.py b/chatgptxblock/chatgptxblock.py index 8f6f4ee..b01d7d0 100644 --- a/chatgptxblock/chatgptxblock.py +++ b/chatgptxblock/chatgptxblock.py @@ -18,11 +18,11 @@ class ChatgptXBlock(StudioEditableXBlockMixin, XBlock): # print(settings) # d_name=settings.DISPLAY_NAME # print("hi",Scope) - def api_init(self, context=None): - xblock_config = self.runtime.handler_env['xblock'].runtime.get_user_state('XBLOCK_CONFIG') - a_key = xblock_config.get('OPENAI_KEY') - print(a_key) - api_init(self) + # def api_init(self, context=None): + xblock_config = runtime.handler_env['xblock'].runtime.get_user_state('XBLOCK_CONFIG') + a_key = xblock_config.get('OPENAI_KEY') + print(a_key) + # api_init(self) display_name = String( display_name="Display Name", help="Display name for this module",