Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bugbug/code_search/mozilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from bugbug.code_search.parser import FunctionSearchParser
from bugbug.code_search.searchfox_api import FunctionSearchSearchfoxAPI
from bugbug.code_search.searchfox_data import FunctionSearchSearchfoxData
from bugbug.tools.code_review import PhabricatorPatch
from bugbug.tools.core.platforms.phabricator import PhabricatorPatch


class FunctionSearchMozilla(FunctionSearch):
Expand Down
20 changes: 20 additions & 0 deletions bugbug/tools/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

from abc import ABC, abstractmethod
from typing import Any


class GenerativeModelTool(ABC):
@property
@abstractmethod
def version(self) -> str: ...

@abstractmethod
def run(self, *args, **kwargs) -> Any: ...

@staticmethod
def _print_answer(answer):
print(f"\u001b[33;1m\033[1;3m{answer}\u001b[0m")
Loading