From daadf6f1d045ffb969b7e91fd996cfccdd5bb659 Mon Sep 17 00:00:00 2001 From: vegu-ai-tools <152010387+vegu-ai-tools@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:43:13 +0300 Subject: [PATCH] fix lmstudio --- src/talemate/client/lmstudio.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/talemate/client/lmstudio.py b/src/talemate/client/lmstudio.py index 5a475d2d..8351dd26 100644 --- a/src/talemate/client/lmstudio.py +++ b/src/talemate/client/lmstudio.py @@ -32,6 +32,12 @@ class LMStudioClient(ClientBase): talemate_parameter="stopping_strings", client_parameter="stop" ), ] + + @property + def api_key(self): + # LMStudio doesn't currently support API keys so we'll just use a dummy key + # since the openai client requires it. + return "sk-1234" def make_client(self): return AsyncOpenAI(base_url=self.api_url + "/v1", api_key=self.api_key)