Refactor AmazonBedrockComponent cache parameter

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-01-03 11:20:15 -03:00
commit 7c6ee78c4a

View file

@ -2,7 +2,6 @@ from typing import Optional
from langchain.llms.base import BaseLLM from langchain.llms.base import BaseLLM
from langchain.llms.bedrock import Bedrock from langchain.llms.bedrock import Bedrock
from langflow import CustomComponent from langflow import CustomComponent
@ -44,7 +43,7 @@ class AmazonBedrockComponent(CustomComponent):
model_kwargs: Optional[dict] = None, model_kwargs: Optional[dict] = None,
endpoint_url: Optional[str] = None, endpoint_url: Optional[str] = None,
streaming: bool = False, streaming: bool = False,
cache: bool | None = None, cache: Optional[bool] = None,
) -> BaseLLM: ) -> BaseLLM:
try: try:
output = Bedrock( output = Bedrock(