-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
fix: enhance robustness in AgentComponent by checking attributes before getting them #7251
base: main
Are you sure you want to change the base?
Conversation
…sult handling * Added support for a detailed thinking feature in the NVIDIAModelComponent, allowing users to enable this functionality through the build configuration. * Refactored the get_chat_result method to prepend a detailed thinking prefix to the system message when the feature is enabled, with error handling for potential issues during this process. * Removed the detailed thinking logic from the LCModelComponent to streamline the codebase.
* Updated the _build_llm_model method to include a check for the existence of attributes before adding them to model_kwargs, preventing potential AttributeError exceptions and improving robustness.
* Standardized the "value" field in multiple starter project JSON files to ensure uniformity in code formatting and structure. * Improved readability by maintaining consistent import statements and function definitions across projects. * This change affects the following files: Instagram Copywriter.json, Market Research.json, News Aggregator.json, Price Deal Finder.json, Research Agent.json, SaaS Pricing.json, and Sequential Tasks Agents.json.
value=False, | ||
info="Enable detailed thinking.", | ||
advanced=True, | ||
).to_dict() |
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.
Why was this necessary? is this preferred to having it in inputs
like it is:
BoolInput(
name="detailed_thinking",
display_name="Detailed Thinking",
info="If true, the model will return a detailed thought process. Only supported by reasoning models.",
value=False,
show=False,
),
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.
It is only used by the NVIDIA componenent from what I understand and it was as base input.
I was having a lot of trouble getting this to work, by the way.
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.
I'm not sure I understand. On line 49 of src/backend/base/langflow/components/models/nvidia.py, there's already the detailed_thinking
input. Was that not working for you? I seemed to work during my testing.
CodSpeed Performance ReportMerging #7251 will degrade performances by 41.77%Comparing Summary
Benchmarks breakdown
|
Introduce a detailed thinking feature for NVIDIA models, improving user configuration options. Enhance the robustness of model kwargs construction in the AgentComponent to prevent potential errors. Standardize JSON files in the starter project for better code consistency and readability.