Rasa integrate with gpt-j

Hi, I want to know that is there any source like website or solution to integrate rasa nlu with gpt-j. I have tried the LanguageModelFeaturizer component in the config file but it does not have the gpt-j model. Also I have tried to add the gpt-j api key in the actions.py file.

import requests
   from typing import Any, Text, Dict, List

   from rasa_sdk import Action, Tracker
   from rasa_sdk.executor import CollectingDispatcher
 
   def gptj(text):
    api_key = "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"
    response = requests.Completion.create(
       model="gpt-j",
       prompt= "\n\n" + text,
       temperature=0.9,
       topK: 50,
       topP: 0.9,
       stop=[" \n\n"]
    ) 
    return response ['choices'][0]['text']

# class ActionHelloWorld(Action):

#     def name(self) -> Text:
#         return "action_hello_world"

#     def run(self, dispatcher: CollectingDispatcher,
#             tracker: Tracker,
#             domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
#
#         dispatcher.utter_message(text="Hello World!")
#
#         return []
# 
  class ActionDefaultFallback(Action):
      
       def init(self):
         #  self.gptj = gptj()
           super()._init_()

       def name(self) -> Text:
           return "action_default_fallback"

       async def run(self, dispatcher, tracker, domain):
           query = tracker.latest_message['text']
           dispatcher.utter_message(text=gptj(query))

           return [UserUtteranceReverted()]

The action python file does not work while I run the “rasa run actions” command in the terminal it has a lot of error and an indentation error for the code. When I run “rasa train” and “rasa shell”, it run and works normally without the gpt-j trained on it.

C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\sanic_cors\extension.py:39: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  SANIC_VERSION = LooseVersion(sanic_version)
2022-11-24 16:23:00 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
Traceback (most recent call last):
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\User\anaconda3\envs\rasa_flow\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa\__main__.py", line 119, in main
    cmdline_arguments.func(cmdline_arguments)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa\cli\run.py", line 59, in run_actions
    sdk.main_from_args(args)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa_sdk\__main__.py", line 25, in main_from_args
    args.auto_reload,
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa_sdk\endpoint.py", line 140, in run
    action_package_name, cors_origins=cors_origins, auto_reload=auto_reload
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa_sdk\endpoint.py", line 82, in create_app
    executor.register_package(action_package_name)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa_sdk\executor.py", line 262, in register_package
    self._import_submodules(package)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa_sdk\executor.py", line 225, in _import_submodules
    self._import_module(full_name)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\site-packages\rasa_sdk\executor.py", line 239, in _import_module
    module = importlib.import_module(name)
  File "C:\Users\User\anaconda3\envs\rasa_flow\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 724, in exec_module
  File "<frozen importlib._bootstrap_external>", line 860, in get_code
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\User\Desktop\RASA INIT\actions\actions.py", line 9
    import requests
    ^
IndentationError: unexpected indent