Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /pavanad_beegen /beegen /commands /smart /base.py
| from beegen.commands.base import BaseCommand | |
| from beegen.commands.smart.core.provider import Provider | |
| from beegen.config import settings | |
| class SmartBaseCommand(BaseCommand): | |
| def __init__(self) -> None: | |
| super().__init__() | |
| self.__config = settings.get_configurations() | |
| self.provider = self.__load_provider() | |
| def __load_provider(self) -> Provider: | |
| if self.__config.has_section("foundation_model"): | |
| try: | |
| provider_config = dict(self.__config["foundation_model"]) | |
| return Provider(provider_config) | |
| except Exception: | |
| pass | |
| return None | |
| def check_provider(self) -> bool: | |
| if self.provider is None: | |
| self.line_prefix("<error>LLM provider configuration not found.</>") | |
| self.line_prefix( | |
| "Please run the command below to set up the required settings:\n" | |
| ) | |
| self.print_markdown("```\nbeegen configure\n```") | |
| self.line("") | |
| self.line_prefix("You may also want to check your current configuration:\n") | |
| self.print_markdown("```\nbeegen configure --show\n```") | |
| self.line("") | |
| return False | |
| return True | |
Xet Storage Details
- Size:
- 1.25 kB
- Xet hash:
- 3b45ad8dcf1f9da2a92f34ffb6d6257aef83ed2c787f399ca9ab230cb374877e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.