Giter Site home page Giter Site logo

streamlitdemo's Introduction

项目简介

迭代内容

  • 修复了客户端在提交时会重复显示文本框和提交按钮的问题
  • 调整了页面图标、人物图标、页面标题等内容

使用方法

  • 配置.env文件中的openai key
  • 安装streamlit、streamlit_chat库
  • 在文件所在目录下,运行:streamlit run app.py

实现逻辑介绍

  • 前端页面元素采用streamlit框架生成
  • 使用streamlit_chat库来呈现对话内容,通过制定对话者的身份,可以自动的将user内容靠右展示,ai内容靠左展示
  • 使用st.session_state保存历史对话信息,刷新页面后st.session_state内容清空
  • demo中默认使用gpt-3.5-turbo原生接口,可自行替换为其它LLM接口

streamlitdemo's People

Contributors

jackley-dev avatar

Stargazers

 avatar

Watchers

 avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.