Giter Site home page Giter Site logo

melih-unsal / demogpt Goto Github PK

View Code? Open in Web Editor NEW
1.6K 15.0 187.0 25.43 MB

Create 🦜️🔗 LangChain apps by just using prompts🌟 Star to support our work! | 只需使用句子即可创建 LangChain 应用程序。 给个star支持我们的工作吧!

Home Page: https://demogpt.io/

License: MIT License

Python 99.98% Shell 0.02%
chatgpt demo langchain llms streamlit streamlit-application chatgpt-api gpt3-turbo langchain-python langchain-app

demogpt's People

Contributors

abdrrman avatar bharathmuthineni avatar melih-unsal avatar zhihuij avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demogpt's Issues

Hope to get in touch

Dear DemoGPT developer,
Greetings! I am Jimmy, a community developer and volunteer at InternLM. Your work has been immensely beneficial to me, and I believe it can be effectively utilized in InternLM as well. Welcome to add Discord https://discord.gg/gF9ezcmtM3 . I hope to get in touch with you.

Best regards,
Jimmy

Running the App produces the error 'which python' returned non-zero exit status 1.

Describe the bug
Running the App produces the error 'which python' returned non-zero exit status 1. Using windows 10, all dependencies are installed

To Reproduce
Steps to reproduce the behavior:

  1. Launch the streamlit app
  2. Under Examples click 'Language Translator

Expected behavior
The app should generate a streamlit application as shown in the demo

Issue
Running the App produces the error 'which python' returned non-zero exit status 1.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome

Additional context
Do I need to create a new environment, also please add other required packages in the requiremets.txt file

Compatibility with LangFlow & Flowise

I've yet to experiment fully with DemoGPT, but I would love to see this tool integrated into LangFlow or Flowise one day. Would be great to see the visualization of the steps, complementing the code generated.

[Windows] Missing dotenv module

Describe the bug
Following a fresh installation in new virtual environment with Python 3.10.11, I'm getting ModuleNotFoundError for termcolor. After installing termcolor with pip, I then get ModuleNotFoundError for dotenv. Unfortunately, I've been unable to install dotenv with pip or with 'pip install dotenv' or 'pip install --use-pep517 dotenv'

To Reproduce
Steps to reproduce the behavior:

  1. Create a new virtual env with python 3.10
  2. git clone https://github.com/melih-unsal/DemoGPT.git
  3. cd DemoGPT
  4. pip install -r requirements.txt
  5. cd src/prompt_based
  6. streamlit run app.py

Expected behavior
Streamlit inititates successfully

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Firefox
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Dependencies need upgrading

Describe the bug
When cloning and running streamlit run src/prompt_based/app.py Streamlit complains about `ModuleNotFoundError: No module named 'altair.vegalite.v4'

To Reproduce
Steps to reproduce the behavior:

  1. Clone
  2. Install requirements.txt
  3. run streamlit run src/prompt_based/app.py

Expected behavior
N/A

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Issue seems to be to add altair>=4.0
https://discuss.streamlit.io/t/modulenotfounderror-no-module-named-altair-vegalite-v4/42921/2

Local LLM as backend for DemoGPT agent

Is your feature request related to a problem? Please describe.
Using local LLMs instead than OpenAI API as backend

Describe the solution you'd like
Create a DemoGPT agent from a locally available model (ideally, a quantized Llama2 model via llama-cpp-python

Describe alternatives you've considered
If that' s already possible, a guide or some instruction about how to do it would be greatly appreciated!

Additional context
NA

Hardcoded paths

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Run the streamlit app with an idea submitted.

Expected behavior
A demo app is produced

Desktop (please complete the following information):

  • Windows 11
  • Streamlit
  • Edge

Additional context
It appears there are some hardcoded paths unique to the original development environment. For example:
FileNotFoundError: [Errno 2] No such file or directory: '/home/melih/anaconda3/envs/synthdata/bin/streamlit'

The .env file seems not working

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. put .env file into the current folder
  2. run demogpt
  3. goto the webpage and type name and description for the app and submit.
  4. "please enter the openai api key"

Expected behavior
in the .env file I changed the "OPENAI_API_BASE" and specified the 'OPENAI_API_KEY', so when clicked on submit, it should directly call the llm

TypeError for path

Describe the bug
I am using DemoGPT on MAC, and ran into TypeError once I submitted.

To Reproduce
Steps to reproduce the behavior:

  1. On terminal, run app with command streamlit run app.py
  2. Click on the example Language Translator
  3. Click submit button
  4. See error

Error Message
Language Translator 📝 2023-07-03 17:26:34.783 Uncaught app exception Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script exec(code, module.__dict__) File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/app.py", line 67, in <module> for data in generate_response(demo_idea): File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/app.py", line 16, in generate_response for data in agent(txt,num_of_iterations): File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/model.py", line 69, in __call__ response, error = self.run_python(total_code) File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/model.py", line 35, in run_python process = subprocess.Popen([python_path,tmp.name], env=environmental_variables,stdout=PIPE, stderr=PIPE) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 966, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1717, in _execute_child and os.path.dirname(executable) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS Monterey ver.12.3.1
  • Browser: Chrome
  • Version: 114.0.5735.106

Invalid OpenAI API Key

Hi,

I keep getting this error message: Invalid OpenAI API Key, even after i've created a brand new key,
when I try to get it to run locally, or in the browser (chrome, edge), using windows 10, python 3.12.
do I need a Plus or Enterprise account with OPENAI to get this to work?

Thanks,

make model name configurable

the home page is reading model list from hardcoded list ,maybe add a configurable way for user to suit for the newest model

UnicodeEncodeError when writing to temporary file on Windows with Python 3.10 or 3.11

Describe the bug
When running DemoGPT on a Windows machine with a Python version 3.11, a UnicodeEncodeError is thrown. The error occurs when the application attempts to write to a temporary file using the tmp.write(code) function in run_code and run_python methods. The problem seems to stem from the code containing Unicode characters which are not supported by the default encoding of the temporary file.

To Reproduce
Steps to reproduce the behavior:
Install Python 3.10 or 3.11 (tried with both) on a Windows 10 machine.
Clone the DemoGPT repository.
Create a virtual environment and install the required libraries as indicated in the project README.
Execute the DemoGPT application with streamlit run src/prompt_based/app.py.
See error.

Expected behavior
The DemoGPT application should be able to handle Unicode characters in the code without throwing a UnicodeEncodeError.

Screenshots
The trace appeared on the app after failing, but could not make it appear again.

Support for custom open-ai base url

Is your feature request related to a problem? Please describe.
Whenever, I would like to use a custom openAI base url such as Azure openAI or my openAI proxy, there is no option for that. DemoGPT should be able to support custom base url for openAI

Describe the solution you'd like
Similar to the openai API key, there should be an option to provide the open AI base url.

Delete the incorrect contact information in the project

Describe the bug
There is a wechat QR code in the folder “docs/resources/”.
I added him on wechat. He's a developer of the project “MetaGPT”.
Whether forget to delete this file when copying the code from MetaGPT.
It is recommended to delete this file and note if the MetaGPT project is referenced

export the code

Amazing project and Idea!! would love to know how can I export the code
that was generated into an app, and continue developing it....

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.