Add input_value parameter to chain components

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-25 13:55:09 -03:00
commit 8c2bca31ff
6 changed files with 20 additions and 2 deletions

View file

@ -18,7 +18,10 @@ class ConversationChainComponent(CustomComponent):
"display_name": "Memory",
"info": "Memory to load context from. If none is provided, a ConversationBufferMemory will be used.",
},
"code": {"show": False},
"input_value": {
"display_name": "Input Value",
"info": "The input value to pass to the chain.",
},
}
def build(

View file

@ -20,7 +20,6 @@ class LLMChainComponent(CustomComponent):
"prompt": {"display_name": "Prompt"},
"llm": {"display_name": "LLM"},
"memory": {"display_name": "Memory"},
"code": {"show": False},
}
def build(

View file

@ -12,6 +12,10 @@ class LLMCheckerChainComponent(CustomComponent):
def build_config(self):
return {
"llm": {"display_name": "LLM"},
"input_value": {
"display_name": "Input Value",
"info": "The input value to pass to the chain.",
},
}
def build(

View file

@ -18,6 +18,10 @@ class LLMMathChainComponent(CustomComponent):
"memory": {"display_name": "Memory"},
"input_key": {"display_name": "Input Key"},
"output_key": {"display_name": "Output Key"},
"input_value": {
"display_name": "Input Value",
"info": "The input value to pass to the chain.",
},
}
def build(

View file

@ -22,6 +22,10 @@ class RetrievalQAWithSourcesChainComponent(CustomComponent):
"memory": {"display_name": "Memory"},
"return_source_documents": {"display_name": "Return Source Documents"},
"retriever": {"display_name": "Retriever"},
"input_value": {
"display_name": "Input Value",
"info": "The input value to pass to the chain.",
},
}
def build(

View file

@ -25,6 +25,10 @@ class SQLGeneratorComponent(CustomComponent):
"display_name": "Top K",
"info": "The number of results per select statement to return. If 0, no limit.",
},
"input_value": {
"display_name": "Input Value",
"info": "The input value to pass to the chain.",
},
}
def build(