Skip to content

Commit 9ad79ec

Browse files
authored
undo changes in llm/client/__init__
1 parent c0f3a5b commit 9ad79ec

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎giskard/llm/client/__init__.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ def get_default_llm_api() -> str:
3636
global _default_llm_api
3737
if _default_llm_api is None:
3838
_default_llm_api = os.getenv(
39-
"GSK_LLM_API",
40-
"azure" if "AZURE_OPENAI_API_KEY" in os.environ else "openai",
39+
"GSK_LLM_API", "azure" if "AZURE_OPENAI_API_KEY" in os.environ else "openai"
4140
).lower()
4241

43-
if _default_llm_api not in {"azure", "openai", "groq"}:
42+
if _default_llm_api not in {"azure", "openai"}:
4443
logging.warning(
45-
f"LLM-based evaluation is only working with `azure`, `openai`, 'groq'. Found {_default_llm_api} in GSK_LLM_API, falling back to `openai`"
44+
f"LLM-based evaluation is only working with `azure` and `openai`. Found {_default_llm_api} in GSK_LLM_API, falling back to `openai`"
4645
)
4746
_default_llm_api = "openai"
4847

@@ -91,6 +90,9 @@ def get_default_client() -> LLMClient:
9190
global _default_llm_model
9291
global _disable_structured_output
9392

93+
if _default_client is not None:
94+
return _default_client
95+
9496
try:
9597
from .litellm import LiteLLMClient
9698

0 commit comments

Comments
 (0)