Fix: NameError when instantiating MiniMax client
Resolve name error where OpenAI was not defined in the scope of _ensure_minimax_client by calling openai.OpenAI directly.
This commit is contained in:
+1
-1
@@ -2133,7 +2133,7 @@ def _ensure_minimax_client() -> None:
|
||||
api_key = creds.get("minimax", {}).get("api_key")
|
||||
if not api_key:
|
||||
raise ValueError("MiniMax API key not found in credentials.toml")
|
||||
_minimax_client = OpenAI(api_key=api_key, base_url="https://api.minimax.chat/v1")
|
||||
_minimax_client = openai.OpenAI(api_key=api_key, base_url="https://api.minimax.chat/v1")
|
||||
|
||||
def _ensure_grok_client() -> Any:
|
||||
global _grok_client
|
||||
|
||||
Reference in New Issue
Block a user