Update apps

This commit is contained in:
Moishe Lettvin
2024-03-15 13:39:33 -04:00
parent b8b35db89c
commit 18bf26de14
5 changed files with 38 additions and 30 deletions

View File

@@ -35,6 +35,9 @@ class BaseOpenAILLMService(LLMService):
def __init__(self, model: str, api_key=None, base_url=None):
super().__init__()
self._model: str = model
self.create_client(api_key=api_key, base_url=base_url)
def create_client(self, api_key=None, base_url=None):
self._client = AsyncOpenAI(api_key=api_key, base_url=base_url)
async def _stream_chat_completions(