Handle if no module found for bots (#564)

Co-authored-by: Taranjeet Singh <reachtotj@gmail.com>
This commit is contained in:
Dev Khant
2023-09-12 09:29:35 +05:30
committed by GitHub
parent 2cb47938fd
commit bdef85f7db
2 changed files with 18 additions and 6 deletions

View File

@@ -3,12 +3,17 @@ import logging
import os
from typing import List, Optional
from fastapi_poe import PoeBot, run
from embedchain.helper.json_serializable import register_deserializable
from .base import BaseBot
try:
from fastapi_poe import PoeBot, run
except ModuleNotFoundError:
raise ModuleNotFoundError(
"The required dependencies for Poe are not installed." 'Please install with `pip install "embedchain[poe]"`'
) from None
def start_command():
parser = argparse.ArgumentParser(description="EmbedChain PoeBot command line interface")