semvec/pypi-packages huggingface dataset:
streamlit-custom-input 0.1.1
Streamlit component for taking user input
Requires Python: >=3.7

# streamlit_custom_input

![input_example](https://github.com/Farah-S/streamlit_custom_input/blob/main/streamlit_custom_input/frontend/public/input_example.png)

Streamlit custom chat input box, it returns the value entered by the user on enter or by clicking on the button. To add a new line the user can press shift+enter. The parameters are as follow:

Args:

    initialValue (string, optional): 
        The initial value that will be displayed in the input box
    
    key (string, optional): 
        Uniquely identifies the input instance. Defaults to "ChatInput".
    
    inputStyle (dict, optional): 
        Allows the customization of the input box style with CSS. 
        The values that can be changed and their default values are 
        {
            paddingLeft: "10px", 
            paddingRight: "10px",
            whiteSpace: "pre-line", 
            resize: "none", 
            marginLeft: "0", 
            marginRight: "10px",
            paddingBottom: "3px", 
            width: "75%", 
            borderRadius: "1rem", 
            maxBlockSize: "75px", 
            borderColor: "#f4efff", 
            backgroundColor: "#fcf9ff"
        }.
        
    buttonStyle (dict, optional): 
        Allows the customization of the input button style with CSS. 
        The values that can be changed and their default values are 
        {    
            width: "55px", 
            borderRadius: "3rem", 
            paddingRight: "5px", 
            paddingTop: "3px", 
            paddingLeft: "9px", 
            display: "flex", 
            justifyContent: "center", 
            backgroundColor: "#edf1ff", 
            color: "#5b5b5c",
            height: "33px"
        }.

Returns:
    string

## Installation instructions

```sh
pip install streamlit_custom_input
```

## Usage instructions
Example of how to use without customization

```python
import streamlit as st

from streamlit_custom_input import ChatInput

value = ChatInput(initialValue="", key="input")
```

Example of how to use with customization

```python
import streamlit as st

from streamlit_custom_input import ChatInput

value = ChatInput(initialValue="", key="input", inputStyle={"backgroundColor":"black"}, buttonStyle={"height":"50px"})
```

For more example please check the app.py
streamlit-custom-chat 0.1.3
Streamlit component for displaying chat messages
Requires Python: >=3.7

# streamlit_custom_chat

![container_example](https://github.com/Farah-S/streamlit_custom_chat/blob/master/streamlit_custom_chat/frontend/public/container_example.png)

Streamlit custom chat messages and container for the chat messages, takes an array of messages for an llm, where each messages can have user or assitant role. The parameters are as follow:

Args:

  messages (list, optional): 
    Messages that will be displayed. Each message must be in the form of 
    {"role":"","content":"","key":""} 
    where the role can be "user" or "assistant", 
    content is the message, 
    key uniquely identifies each messages. 
    Defaults to [].
  
  key (string, optional): 
    uniquely identifies the container instance. Defaults to None.
  
  containerStyle (dict, optional): 
    Allows the customization of the chat container style with CSS. 
    The values that can be changed and their default values are
    
    {
      "overflowY": "auto", 
      "scrollBackgroundColor": "transparent", 
      "borderColor": "transparent",
      "borderRadius": "2rem", 
      "height": "550px", 
      "boxShadow": "inset 0px 0 20px 5px rgb(219 219 219 / 11%), 0px 0px 0px 0px rgb(0 0 0 / 8%), 0px 1px 3px 0px rgb(0 0 0 / 0%)", 
      "backgroundColor": "#fafaff"
      }.
      
  bubbleStyle (dict, optional): 
    Allows the customization of the chat bubble style with CSS. 
    The values that can be changed and their default values are 
    
    {
      textColor:"#534eb1", 
      userBackgroundColor:"rgb(232, 243, 255)", 
      agentBackgroundColor:"#f0efff", 
      paddingRight:"10px", 
      paddingLeft:"10px", 
      paddingBottom:"7px", 
      paddingTop:"7px",
      fontWeight:"525", 
      borderRadius:"2rem", 
      fontFamily:"itim"
    }.

Returns:
  None

## Installation instructions

```sh
pip install streamlit-custom-chat
```

## Usage instructions
Example of how to use without customization

```python
import streamlit as st

from streamlit_custom_chat import ChatContainer

ChatContainer(messages=[{"role":"assistant", "content":"hello!", "key":"0"}], key="")
```

Example of how to use with customization

```python
import streamlit as st

from streamlit_custom_chat import ChatContainer

ChatContainer(messages=[{"role":"assistant", "content":"hello!", "key":"0"}, {"role":"user", "content":"hello!", "key":"1"}], key="", containerStyle={"backgroundColor":"pink"}, bubbleStyle={"userBackgroundColor":"#f0eeef"})
```

For more example please check the app.py