Update input field names in model components
This commit is contained in:
parent
557282cea5
commit
0a77490f8c
16 changed files with 25 additions and 25 deletions
|
|
@ -20,7 +20,10 @@ class RetrievalQAComponent(CustomComponent):
|
|||
"input_key": {"display_name": "Input Key", "advanced": True},
|
||||
"output_key": {"display_name": "Output Key", "advanced": True},
|
||||
"return_source_documents": {"display_name": "Return Source Documents"},
|
||||
"inputs": {"display_name": "Input", "input_types": ["Text", "Document"]},
|
||||
"input_value": {
|
||||
"display_name": "Input",
|
||||
"input_types": ["Text", "Document"],
|
||||
},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ class TextInput(CustomComponent):
|
|||
description = "Used to pass text input to the next component."
|
||||
|
||||
field_config = {
|
||||
"value": {"display_name": "Value", "multiline": True},
|
||||
"input_value": {"display_name": "Value", "multiline": True},
|
||||
}
|
||||
|
||||
def build(self, value: Optional[str] = "") -> Text:
|
||||
self.status = value
|
||||
if not value:
|
||||
value = ""
|
||||
return value
|
||||
def build(self, input_value: Optional[str] = "") -> Text:
|
||||
self.status = input_value
|
||||
if not input_value:
|
||||
input_value = ""
|
||||
return input_value
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class AmazonBedrockComponent(CustomComponent):
|
|||
"model_kwargs": {"display_name": "Model Kwargs"},
|
||||
"cache": {"display_name": "Cache"},
|
||||
"code": {"advanced": True},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class AnthropicLLM(CustomComponent):
|
|||
"info": "Endpoint of the Anthropic API. Defaults to 'https://api.anthropic.com' if not specified.",
|
||||
},
|
||||
"code": {"show": False},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class AzureChatOpenAIComponent(CustomComponent):
|
|||
"info": "Maximum number of tokens to generate.",
|
||||
},
|
||||
"code": {"show": False},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class QianfanChatEndpointComponent(CustomComponent):
|
|||
"info": "Endpoint of the Qianfan LLM, required if custom model used.",
|
||||
},
|
||||
"code": {"show": False},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class CTransformersComponent(CustomComponent):
|
|||
"field_type": "dict",
|
||||
"value": '{"top_k":40,"top_p":0.95,"temperature":0.8,"repetition_penalty":1.1,"last_n_tokens":64,"seed":-1,"max_new_tokens":256,"stop":"","stream":"False","reset":"True","batch_size":8,"threads":-1,"context_length":-1,"gpu_layers":0}',
|
||||
},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class CohereComponent(CustomComponent):
|
|||
"type": "float",
|
||||
"show": True,
|
||||
},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
from typing import Optional
|
||||
|
||||
from langchain_google_genai import ChatGoogleGenerativeAI # type: ignore
|
||||
from pydantic.v1.types import SecretStr
|
||||
|
||||
from langflow import CustomComponent
|
||||
from langflow.field_typing import RangeSpec, Text
|
||||
from langflow.field_typing import RangeSpec
|
||||
|
||||
|
||||
class GoogleGenerativeAIComponent(CustomComponent):
|
||||
|
|
@ -50,7 +47,7 @@ class GoogleGenerativeAIComponent(CustomComponent):
|
|||
"code": {
|
||||
"advanced": True,
|
||||
},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {e": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class HuggingFaceEndpointsComponent(CustomComponent):
|
|||
"field_type": "code",
|
||||
},
|
||||
"code": {"show": False},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class LlamaCppComponent(CustomComponent):
|
|||
"use_mmap": {"display_name": "Use Mmap", "advanced": True},
|
||||
"verbose": {"display_name": "Verbose", "advanced": True},
|
||||
"vocab_only": {"display_name": "Vocab Only", "advanced": True},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ class ChatOllamaComponent(CustomComponent):
|
|||
"info": "Template to use for generating text.",
|
||||
"advanced": True,
|
||||
},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class OpenAIModelComponent(CustomComponent):
|
|||
|
||||
def build_config(self):
|
||||
return {
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
"max_tokens": {
|
||||
"display_name": "Max Tokens",
|
||||
"advanced": False,
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class ChatVertexAIComponent(CustomComponent):
|
|||
"value": False,
|
||||
"advanced": True,
|
||||
},
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class RunnableExecComponent(CustomComponent):
|
|||
"display_name": "Input Key",
|
||||
"info": "The key to use for the input.",
|
||||
},
|
||||
"inputs": {
|
||||
"input_value": {
|
||||
"display_name": "Inputs",
|
||||
"info": "The inputs to pass to the runnable.",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class ChromaSearchComponent(CustomComponent):
|
|||
- dict: A dictionary containing the configuration options for the component.
|
||||
"""
|
||||
return {
|
||||
"inputs": {"display_name": "Input"},
|
||||
"input_value": {"display_name": "Input"},
|
||||
"search_type": {
|
||||
"display_name": "Search Type",
|
||||
"options": ["Similarity", "MMR"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue