refactor: Update display names for input fields in ChatComponent and TextInput

This commit updates the display names for the input fields in the ChatComponent and TextInput classes. The display name for the "Message" input field in ChatComponent is changed to "Text", and the display name for the "Value" input field in TextInput is changed to "Text". These updates improve the clarity and consistency of the input field labels.

Fixes #<issue_number>
This commit is contained in:
Rodrigo 2024-06-09 23:09:01 -03:00
commit ec3c2b3ab7
5 changed files with 14 additions and 5 deletions

View file

@ -13,7 +13,7 @@ class ChatInput(ChatComponent):
build_config = super().build_config()
build_config["input_value"] = {
"input_types": [],
"display_name": "Message",
"display_name": "Text",
"multiline": True,
}

View file

@ -12,7 +12,7 @@ class TextInput(TextComponent):
def build_config(self):
return {
"input_value": {
"display_name": "Value",
"display_name": "Text",
"input_types": ["Record", "Text"],
"info": "Text or Record to be passed as input.",
},

View file

@ -79,7 +79,7 @@ class OpenAIModelComponent(LCModelComponent):
input_value: Text,
openai_api_key: str,
temperature: float = 0.1,
model_name: str = "gpt-4o",
model_name: str = "gpt-3.5-turbo",
max_tokens: Optional[int] = 256,
model_kwargs: NestedDict = {},
openai_api_base: Optional[str] = None,

View file

@ -2,9 +2,18 @@ from langflow.custom import CustomComponent
from langflow.schema import Record
class RecordsOutput(CustomComponent):
class RecordOutput(CustomComponent):
display_name = "Records Output"
description = "Display Records as a Table"
def build_config(self):
return {
"input_value": {
"display_name": "Records",
"input_types": ["Record"],
"info": "Record or Record list to be passed as input.",
},
}
def build(self, input_value: Record) -> Record:
return input_value

View file

@ -12,7 +12,7 @@ class TextOutput(TextComponent):
def build_config(self):
return {
"input_value": {
"display_name": "Value",
"display_name": "Text",
"input_types": ["Record", "Text"],
"info": "Text or Record to be passed as output.",
},