feat: Add Multi-Model Provider Support to Agent Component (#4416)

* Add Multi-Model Provider Support to Agent Component

- Integrated model provider constants from `model_input_constants.py` into the Agent component to support multiple LLM providers
- Added dynamic field management for different model providers (OpenAI, Azure, Groq, Anthropic, NVIDIA)
- Implemented a dropdown for model provider selection with automatic input field updates

* sorted list

* Update agent.py

making custom separate from sort

* chore: remove unit test

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
This commit is contained in:
Edwin Jose 2024-11-06 11:15:22 -05:00 • committed by GitHub
commit ae7d037fe1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 134 additions and 131 deletions

View file

@ -1,25 +0,0 @@
from src.backend.base.langflow.base.models.model_constants import ModelConstants
def test_provider_names():
# Initialize the ModelConstants
ModelConstants.initialize()
# Expected provider names
expected_provider_names = [
"AIML",
"Amazon Bedrock",
"Anthropic",
"Azure OpenAI",
"Ollama",
"Vertex AI",
"Cohere",
"Google Generative AI",
"HuggingFace",
"OpenAI",
"Perplexity",
"Qianfan",
]
# Assert that the provider names match the expected list
assert expected_provider_names == ModelConstants.PROVIDER_NAMES