You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Ask LLM model a question within the notebook"""
if not self.chat_bot:
key = self.get_api_key()
if not key:
raise RuntimeError(
"Please set environment variable CHATGPT_API_KEY before using Feathr Chat. You can get your API key for ChatGPT at https://platform.openai.com/account/api-keys. For example, run: os.environ['CHATGPT_API_KEY'] = 'your api key' and retry."
)
self.chat_bot = Chatbot(key)
content = self.chat_bot.ask(question_with_prompt)
if "```" in content and self.is_a_code_gen_question(question_with_prompt):