Create a completion from messages in text (and potentially also encoded images).
(
self,
messages: List[Dict[str, str]],
model: str,
temperature: float,
stop_tokens: Optional[List[str]] = None,
)
| 13 | |
| 14 | @abc.abstractmethod |
| 15 | def create_completion( |
| 16 | self, |
| 17 | messages: List[Dict[str, str]], |
| 18 | model: str, |
| 19 | temperature: float, |
| 20 | stop_tokens: Optional[List[str]] = None, |
| 21 | ) -> Tuple[str, Dict[str, int]]: |
| 22 | """Create a completion from messages in text (and potentially also encoded images).""" |
| 23 | pass |
| 24 | |
| 25 | @abc.abstractmethod |
| 26 | def init_provider(self, provider_cfg) -> None: |