Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
undo changes in llm/client/__init__
  • Loading branch information
henchaves authored Jul 2, 2025
commit 9ad79ec322b4a82f780435bfdd6f16818ca10fc2
10 changes: 6 additions & 4 deletions giskard/llm/client/__init__.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should set groq as default LLM client.
Could we revert the modifications here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should set groq as default LLM client. Could we revert the modifications here?

Thank you for the feedback. Before I make any changes, I want to ensure I understand your request correctly:

  1. I'll remove Groq from being automatically selected as a default LLM client by modifying the get_default_llm_api() function in __init__.py

  2. I'll keep the following in place so Groq can still be used when explicitly selected:

    • The Groq client implementation (groq_client.py)
    • The Groq dependency in pyproject.toml
    • The test case for the Groq client
    • "groq" as a valid option in the API list (users can still explicitly set GSK_LLM_API="groq")

Is this understanding correct? If you'd prefer I completely remove all Groq-related changes, please let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kunjanshah0811, yes exactly!
Just reverting llm/client/__init__.py should be fine, you can keep the groq_client.py as it is.

Copy link
Contributor Author

@kunjanshah0811 kunjanshah0811 Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kunjanshah0811, yes exactly! Just reverting llm/client/__init__.py should be fine, you can keep the groq_client.py as it is.

@henchaves I have made suggested changes with the recent commit. Please have a look and let me know. Thanks a lot 🚀.

Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ def get_default_llm_api() -> str:
global _default_llm_api
if _default_llm_api is None:
_default_llm_api = os.getenv(
"GSK_LLM_API",
"azure" if "AZURE_OPENAI_API_KEY" in os.environ else "openai",
"GSK_LLM_API", "azure" if "AZURE_OPENAI_API_KEY" in os.environ else "openai"
).lower()

if _default_llm_api not in {"azure", "openai", "groq"}:
if _default_llm_api not in {"azure", "openai"}:
logging.warning(
f"LLM-based evaluation is only working with `azure`, `openai`, 'groq'. Found {_default_llm_api} in GSK_LLM_API, falling back to `openai`"
f"LLM-based evaluation is only working with `azure` and `openai`. Found {_default_llm_api} in GSK_LLM_API, falling back to `openai`"
)
_default_llm_api = "openai"

Expand Down Expand Up @@ -91,6 +90,9 @@ def get_default_client() -> LLMClient:
global _default_llm_model
global _disable_structured_output

if _default_client is not None:
return _default_client

try:
from .litellm import LiteLLMClient

Expand Down
Loading