streamlit-chitchat


Namestreamlit-chitchat JSON
Version 0.1.7 PyPI version JSON
download
home_page
Summary
upload_time2023-06-17 18:37:09
maintainer
docs_urlNone
authork4144
requires_python>=3.9,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <br>

  

<img  src="https://user-images.githubusercontent.com/7164864/217935870-c0bc60a3-6fc0-4047-b011-7b4c59488c91.png"  alt="Streamlit logo"  style="margin-top:50px"></img>

  

# streamlit-chitchat

  

**make chat messages easier to style in streamlit**

  

streamlit-chitchat lets you style messages from the user and responses from a bot differently. you can also update an existing message, so that streamed tokens render as they are received. 


  

## Installation

  

Open a terminal and run:

  

```bash

$  pip  install  streamlit-chitchat

```

## example use
  

in your streamlit app, insert:

  

```bash

from streamlit-chitchat.chitchat import message
message('hello, how are you?', is_user=True)
bot=message()
for w in 'excellent! have any plans for tonight?'.split(' '):
	bot.write(w+' ')
```

## example styling
  
#### use an avatar:
```bash

message('hello, how are you?', is_user=True, avatar='images/test.png')
```

you can also use image urls, svg code or svg files 




#### set background color:
```bash

message('hello, how are you?', is_user=True, background='rgb(150,160,150)')
```

In  order to make the color lighter, you can use rgb with alpha value: background='rgb(130,120,100, 0.5)'

#### set font size:
```bash

message('hello, how are you?', is_user=True, font_size='1rem')
```

#### other values

font color, width , or margin 
```bash
message('hello', color='rgb(20,20,30)', width='70%', margin='5px')
```



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "streamlit-chitchat",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "k4144",
    "author_email": "github.k4144@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f6/23/c45ac018bea8f91ab8446a49102cacc1318f7aaf7d8a6bd5246ba102543c/streamlit_chitchat-0.1.7.tar.gz",
    "platform": null,
    "description": "<br>\n\n  \n\n<img  src=\"https://user-images.githubusercontent.com/7164864/217935870-c0bc60a3-6fc0-4047-b011-7b4c59488c91.png\"  alt=\"Streamlit logo\"  style=\"margin-top:50px\"></img>\n\n  \n\n# streamlit-chitchat\n\n  \n\n**make chat messages easier to style in streamlit**\n\n  \n\nstreamlit-chitchat lets you style messages from the user and responses from a bot differently. you can also update an existing message, so that streamed tokens render as they are received. \n\n\n  \n\n## Installation\n\n  \n\nOpen a terminal and run:\n\n  \n\n```bash\n\n$  pip  install  streamlit-chitchat\n\n```\n\n## example use\n  \n\nin your streamlit app, insert:\n\n  \n\n```bash\n\nfrom streamlit-chitchat.chitchat import message\nmessage('hello, how are you?', is_user=True)\nbot=message()\nfor w in 'excellent! have any plans for tonight?'.split(' '):\n\tbot.write(w+' ')\n```\n\n## example styling\n  \n#### use an avatar:\n```bash\n\nmessage('hello, how are you?', is_user=True, avatar='images/test.png')\n```\n\nyou can also use image urls, svg code or svg files \n\n\n\n\n#### set background color:\n```bash\n\nmessage('hello, how are you?', is_user=True, background='rgb(150,160,150)')\n```\n\nIn  order to make the color lighter, you can use rgb with alpha value: background='rgb(130,120,100, 0.5)'\n\n#### set font size:\n```bash\n\nmessage('hello, how are you?', is_user=True, font_size='1rem')\n```\n\n#### other values\n\nfont color, width , or margin \n```bash\nmessage('hello', color='rgb(20,20,30)', width='70%', margin='5px')\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "",
    "version": "0.1.7",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f812b4ad4861c21754f5643687585574024f8bac39e0999a02330b5b14b3f13d",
                "md5": "7aede9c92fedde63e2c0401abc4f5847",
                "sha256": "203a3a2ad3b5b68c3e97235986ea802b9b4205c15a35a3d318e802df0e759167"
            },
            "downloads": -1,
            "filename": "streamlit_chitchat-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7aede9c92fedde63e2c0401abc4f5847",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 6732,
            "upload_time": "2023-06-17T18:37:08",
            "upload_time_iso_8601": "2023-06-17T18:37:08.428917Z",
            "url": "https://files.pythonhosted.org/packages/f8/12/b4ad4861c21754f5643687585574024f8bac39e0999a02330b5b14b3f13d/streamlit_chitchat-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f623c45ac018bea8f91ab8446a49102cacc1318f7aaf7d8a6bd5246ba102543c",
                "md5": "e62c46dd8cc33824eab5caff874adbd2",
                "sha256": "e123c9c39870eea80342366e3a2dd75b25e1bf9765cecb535e1a4409d2b2bfce"
            },
            "downloads": -1,
            "filename": "streamlit_chitchat-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "e62c46dd8cc33824eab5caff874adbd2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 5062,
            "upload_time": "2023-06-17T18:37:09",
            "upload_time_iso_8601": "2023-06-17T18:37:09.892096Z",
            "url": "https://files.pythonhosted.org/packages/f6/23/c45ac018bea8f91ab8446a49102cacc1318f7aaf7d8a6bd5246ba102543c/streamlit_chitchat-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-17 18:37:09",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "streamlit-chitchat"
}
        
Elapsed time: 0.07769s