feat: enhance Anthropic component UI and validation (#5690)

* feat: enhance Anthropic component UI and validation

The following improvements were made to the Anthropic component:
- Made API key field required to ensure proper configuration
- Replaced FloatInput with SliderInput for temperature parameter to improve user experience
- Added step control (0.01) for more precise temperature adjustments

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* fix: make anthropic_api_key required in AnthropicModel component

This change ensures that the Anthropic API key is required for the component to work properly,
preventing potential runtime errors when the key is missing.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* fix: make anthropic_api_key required in AnthropicModel component

This change ensures that the Anthropic API key is required for the component to work properly,
preventing potential runtime errors when the key is missing.

Co-authored-by: Vinícios Batista da Silva <vinicios.batsi@gmail.com>

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
This commit is contained in:
Vinícios Batista da Silva 2025-01-17 20:00:57 -03:00 committed by GitHub
commit f4a7d9d797
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -38,6 +38,7 @@ class AnthropicModelComponent(LCModelComponent):
display_name="Anthropic API Key",
info="Your Anthropic API key.",
value=None,
required=True,
real_time_refresh=True,
),
SliderInput(

File diff suppressed because one or more lines are too long