r"""Runs the query to the backend model. Args: messages (List[OpenAIMessage]): Message list with the chat history in OpenAI API format. Returns: Union[ChatCompletion, Stream[ChatCompletionChunk]]: `ChatCompletion` in the non-s
(
self,
messages: List[OpenAIMessage],
)
| 75 | |
| 76 | @abstractmethod |
| 77 | def run( |
| 78 | self, |
| 79 | messages: List[OpenAIMessage], |
| 80 | ) -> Union[ChatCompletion, Stream[ChatCompletionChunk]]: |
| 81 | r"""Runs the query to the backend model. |
| 82 | |
| 83 | Args: |
| 84 | messages (List[OpenAIMessage]): Message list with the chat history |
| 85 | in OpenAI API format. |
| 86 | |
| 87 | Returns: |
| 88 | Union[ChatCompletion, Stream[ChatCompletionChunk]]: |
| 89 | `ChatCompletion` in the non-stream mode, or |
| 90 | `Stream[ChatCompletionChunk]` in the stream mode. |
| 91 | """ |
| 92 | pass |
| 93 | |
| 94 | @abstractmethod |
| 95 | def check_model_config(self): |
nothing calls this directly
no outgoing calls
no test coverage detected