Last active
March 23, 2023 11:44
-
-
Save monk1337/03c9e4874c8eb2ee4bce75438d73f5c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
from basemodel import Model | |
class MockModel(Model): | |
@classmethod | |
def supported_models(cls) -> List[str]: | |
return ["mock_model"] | |
def _verify_model(self): | |
pass | |
def set_key(self, api_key: str): | |
pass | |
def set_model(self, model: str): | |
pass | |
def get_description(self) -> str: | |
return "Mock model for testing" | |
def get_endpoint(self) -> str: | |
return "https://mock.endpoint/" | |
def get_parameters(self) -> Dict[str, str]: | |
return {"param": "value"} | |
def run(self, prompts: List[str]) -> List[str]: | |
return ["response" for _ in prompts] | |
def model_output(self, response): | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment