{"id":25232962,"url":"https://github.com/farah-s/streamlit_custom_chat","last_synced_at":"2026-04-17T07:31:47.200Z","repository":{"id":212687647,"uuid":"726602984","full_name":"Farah-S/streamlit_custom_chat","owner":"Farah-S","description":"Streamlit custom chat messages and container for the chat messages","archived":false,"fork":false,"pushed_at":"2024-01-02T23:44:34.000Z","size":10923,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T13:43:05.566Z","etag":null,"topics":["reactjs","streamlit-component","streamlit-components"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Farah-S.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T21:01:58.000Z","updated_at":"2024-01-02T21:26:42.000Z","dependencies_parsed_at":"2024-01-03T01:13:43.499Z","dependency_job_id":"f09d0aa2-cb38-41fd-9e24-2e51c036a870","html_url":"https://github.com/Farah-S/streamlit_custom_chat","commit_stats":null,"previous_names":["farah-s/streamlit_custom_chat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farah-S%2Fstreamlit_custom_chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farah-S%2Fstreamlit_custom_chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farah-S%2Fstreamlit_custom_chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Farah-S%2Fstreamlit_custom_chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Farah-S","download_url":"https://codeload.github.com/Farah-S/streamlit_custom_chat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247362943,"owners_count":20926859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["reactjs","streamlit-component","streamlit-components"],"created_at":"2025-02-11T13:37:35.771Z","updated_at":"2026-04-17T07:31:47.153Z","avatar_url":"https://github.com/Farah-S.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# streamlit_custom_chat\n\n![container_example](https://github.com/Farah-S/streamlit_custom_chat/blob/master/streamlit_custom_chat/frontend/public/container_example.png)\n\nStreamlit 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:\n\nArgs:\n\n  messages (list, optional): \n    Messages that will be displayed. Each message must be in the form of \n    {\"role\":\"\",\"content\":\"\",\"key\":\"\"} \n    where the role can be \"user\" or \"assistant\", \n    content is the message, \n    key uniquely identifies each messages. \n    Defaults to [].\n  \n  key (string, optional): \n    uniquely identifies the container instance. Defaults to None.\n  \n  containerStyle (dict, optional): \n    Allows the customization of the chat container style with CSS. \n    The values that can be changed and their default values are\n    \n    {\n      \"overflowY\": \"auto\", \n      \"scrollBackgroundColor\": \"transparent\", \n      \"borderColor\": \"transparent\",\n      \"borderRadius\": \"2rem\", \n      \"height\": \"550px\", \n      \"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%)\", \n      \"backgroundColor\": \"#fafaff\"\n      }.\n      \n  bubbleStyle (dict, optional): \n    Allows the customization of the chat bubble style with CSS. \n    The values that can be changed and their default values are \n    \n    {\n      textColor:\"#534eb1\", \n      userBackgroundColor:\"rgb(232, 243, 255)\", \n      agentBackgroundColor:\"#f0efff\", \n      paddingRight:\"10px\", \n      paddingLeft:\"10px\", \n      paddingBottom:\"7px\", \n      paddingTop:\"7px\",\n      fontWeight:\"525\", \n      borderRadius:\"2rem\", \n      fontFamily:\"itim\"\n    }.\n\nReturns:\n  None\n\n## Installation instructions\n\n```sh\npython -m pip install --index-url https://test.pypi.org/simple/ --no-deps streamlit_custom_chat\n```\n\n## Usage instructions\nExample of how to use without customization\n\n```python\nimport streamlit as st\n\nfrom streamlit_custom_chat import ChatContainer\n\nChatContainer(messages=[{\"role\":\"assistant\", \"content\":\"hello!\", \"key\":\"0\"}], key=\"\")\n```\n\nExample of how to use with customization\n\n```python\nimport streamlit as st\n\nfrom streamlit_custom_chat import ChatContainer\n\nChatContainer(messages=[{\"role\":\"assistant\", \"content\":\"hello!\", \"key\":\"0\"}, {\"role\":\"user\", \"content\":\"hello!\", \"key\":\"1\"}], key=\"\", containerStyle={\"backgroundColor\":\"pink\"}, bubbleStyle={\"userBackgroundColor\":\"#f0eeef\"})\n```\n\nFor more example please check the app.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarah-s%2Fstreamlit_custom_chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffarah-s%2Fstreamlit_custom_chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffarah-s%2Fstreamlit_custom_chat/lists"}