-
Notifications
You must be signed in to change notification settings - Fork 6.1k
feat: add tool mode unsupported list for groq Models #7497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tested curated list of latest models
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
@@ -94,7 +100,7 @@ def get_models(self, tool_model_enabled: bool | None = None) -> list[str]: | |||
api_key=self.api_key, | |||
base_url=self.base_url, | |||
) | |||
if not self.supports_tool_calling(model_with_tool): | |||
if not self.supports_tool_calling(model_with_tool) or model in TOOL_CALLING_UNSUPPORTED_GROQ_MODELS: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'model' is undefined in this condition and should likely be 'model_with_tool'. Update the variable to ensure the logic functions as intended.
if not self.supports_tool_calling(model_with_tool) or model in TOOL_CALLING_UNSUPPORTED_GROQ_MODELS: | |
if not self.supports_tool_calling(model_with_tool) or model_with_tool in TOOL_CALLING_UNSUPPORTED_GROQ_MODELS: |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Tested curated list of latest models.
This pull request includes significant changes to the handling of GROQ models in the
src/backend/base/langflow
directory. The updates involve categorizing models into different groups, updating import statements, and modifying the logic to filter out unsupported models.Categorization of GROQ models:
src/backend/base/langflow/base/models/groq_constants.py
: The GROQ models are now categorized intoGROQ_PRODUCTION_MODELS
,GROQ_PREVIEW_MODELS
,DEPRECATED_GROQ_MODELS
,UNSUPPORTED_GROQ_MODELS
, andTOOL_CALLING_UNSUPPORTED_GROQ_MODELS
. This change helps in better organizing and managing the models.Updates to import statements:
src/backend/base/langflow/components/models/groq.py
: Updated import statements to include the new model categoriesTOOL_CALLING_UNSUPPORTED_GROQ_MODELS
andUNSUPPORTED_GROQ_MODELS
.Filtering unsupported models:
src/backend/base/langflow/components/models/groq.py
: Modified theget_models
method to filter out models listed inUNSUPPORTED_GROQ_MODELS
when fetching model IDs.src/backend/base/langflow/components/models/groq.py
: Updated theget_models
method to also exclude models listed inTOOL_CALLING_UNSUPPORTED_GROQ_MODELS
if tool calling is not supported.