Skip to content
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

feat: add aws bedrock to AgentComponent #4515

Merged
merged 16 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
0c41c9b
update model list as constants
edwinjosechittilappilly Nov 12, 2024
64a80d0
Update amazon_bedrock.py
edwinjosechittilappilly Nov 12, 2024
7204695
Update model_input_constants.py
edwinjosechittilappilly Nov 12, 2024
1404a0a
Merge branch 'main' into fix-aws-bedrock-components-secrets
edwinjosechittilappilly Nov 12, 2024
cba868f
Merge branch 'fix-aws-bedrock-components-secrets' into feat-add-aws-b…
edwinjosechittilappilly Nov 12, 2024
4d85f80
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
292cd68
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
52988e2
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
97bdb4c
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
4958d1b
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
21568fd
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
8333b26
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
40a8360
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
4e0131a
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
6b6e8f8
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
9909c1b
Merge branch 'main' into feat-add-aws-bedrock-simple-agents
edwinjosechittilappilly Nov 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/backend/base/langflow/base/models/model_input_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from langflow.base.models.model import LCModelComponent
from langflow.components.models.amazon_bedrock import AmazonBedrockComponent
from langflow.components.models.anthropic import AnthropicModelComponent
from langflow.components.models.azure_openai import AzureChatOpenAIComponent
from langflow.components.models.groq import GroqModel
Expand Down Expand Up @@ -29,7 +30,7 @@ def create_input_fields_dict(inputs, prefix):
GROQ_INPUTS = get_filtered_inputs(GroqModel)
ANTHROPIC_INPUTS = get_filtered_inputs(AnthropicModelComponent)
NVIDIA_INPUTS = get_filtered_inputs(NVIDIAModelComponent)

AMAZON_BEDROCK_INPUTS = get_filtered_inputs(AmazonBedrockComponent)

OPENAI_FIELDS = {input_.name: input_ for input_ in OPENAI_INPUTS}

Expand All @@ -38,8 +39,9 @@ def create_input_fields_dict(inputs, prefix):
GROQ_FIELDS = create_input_fields_dict(GROQ_INPUTS, "groq")
ANTHROPIC_FIELDS = create_input_fields_dict(ANTHROPIC_INPUTS, "anthropic")
NVIDIA_FIELDS = create_input_fields_dict(NVIDIA_INPUTS, "nvidia")
AMAZON_BEDROCK_FIELDS = create_input_fields_dict(AMAZON_BEDROCK_INPUTS, "amazon_bedrock")

MODEL_PROVIDERS = ["Azure OpenAI", "OpenAI", "Groq", "Anthropic", "NVIDIA"]
MODEL_PROVIDERS = ["Azure OpenAI", "OpenAI", "Groq", "Anthropic", "NVIDIA", "Amazon Bedrock"]

MODEL_PROVIDERS_DICT = {
"Azure OpenAI": {
Expand Down Expand Up @@ -67,5 +69,11 @@ def create_input_fields_dict(inputs, prefix):
"prefix": "nvidia_",
"component_class": NVIDIAModelComponent(),
},
"Amazon Bedrock": {
"fields": AMAZON_BEDROCK_FIELDS,
"inputs": AMAZON_BEDROCK_INPUTS,
"prefix": "amazon_bedrock_",
"component_class": AmazonBedrockComponent(),
},
}
ALL_PROVIDER_FIELDS: list[str] = [field for provider in MODEL_PROVIDERS_DICT.values() for field in provider["fields"]]
Loading