diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..d072212 --- /dev/null +++ b/404.html @@ -0,0 +1,410 @@ + + + +
+ + + + + + + + + + + + + +This Python Streamlit application uses LogicModel
and StreamlitModel
from the model
module to generate and execute Python code based on user input. The user can input their idea, and the application will generate code, refine it, test it, and display the results. The Streamlit web app allows users to interact with the model in real time, which is particularly useful for demonstrating the capabilities of the models.
At the beginning of the application, all necessary modules such as streamlit
, model
, os
, logging
, webbrowser
, and signal
are imported. The logging level is set to DEBUG with the format 'levelname-message'.
The application tries to load environment variables using the dotenv
module. If the module is not present, it logs an error message but continues to execute the application.
The function generate_response
uses the LogicModel
to generate responses for the given text. It's a generator function yielding the output of the LogicModel
in each iteration.
The title of the Streamlit page is set using st.set_page_config
.
Input fields for the OpenAI API Key, demo title, and demo idea are created using st.sidebar.text_input
, st.text_input
, and st.text_area
respectively. The OpenAI API Key defaults to the value of the environment variable 'OPENAI_API_KEY'.
A form is created to handle the submission of user input. If the user submits the form, the application checks if a valid OpenAI API Key is entered. If not, it displays a warning message.
+If the input is valid, instances of LogicModel
and StreamlitModel
are created with the provided OpenAI API Key.
The application then enters a loop where it generates, refines, tests and executes code using the LogicModel
. The progress of this process is displayed on a Streamlit progress bar.
If the code execution is successful, it launches a new Streamlit application running the generated code and opens the new application in the web browser.
+In case the execution was not successful, the application refines the code and retries. If all attempts are unsuccessful, it reports a failure.
+ + + + + + +DemoGPT is an open-source project that leverages the power of Large Language Models (LLM) to auto-generate LangChain code, which is then transformed into interactive Streamlit applications. This process is powered by the synergy of GPT-3.5-turbo & Llama 2.
+DemoGPT is a revolutionary initiative reshaping the landscape of LLM-based application development. By combining the capabilities of GPT-3.5-turbo and Llama 2, DemoGPT auto-generates LangChain code, which is then transformed into interactive Streamlit applications. This process is enriched with a sophisticated architecture that translates user instructions into interactive applications. DemoGPT is more than a project; it's a visionary approach, pushing the boundaries of what's possible in LLM-based application development.
+DemoGPT's core functionalities revolve around four main steps:
+These functionalities allow DemoGPT to transform user instructions into interactive applications, making it a powerful tool for LLM-based application development.
+The project is organized into several modules and files. Here's a brief overview of the project structure:
+ +Please navigate through the documentation for a detailed understanding of the project.
+ + + + + + +DemoGPT is an open-source project that leverages the power of Large Language Models (LLM) to auto-generate LangChain code, which is then transformed into interactive Streamlit applications. This process is powered by the synergy of GPT-3.5-turbo & Llama 2.
"},{"location":"#brief-description","title":"Brief Description","text":"DemoGPT is a revolutionary initiative reshaping the landscape of LLM-based application development. By combining the capabilities of GPT-3.5-turbo and Llama 2, DemoGPT auto-generates LangChain code, which is then transformed into interactive Streamlit applications. This process is enriched with a sophisticated architecture that translates user instructions into interactive applications. DemoGPT is more than a project; it's a visionary approach, pushing the boundaries of what's possible in LLM-based application development.
"},{"location":"#core-functionalities","title":"Core Functionalities","text":"DemoGPT's core functionalities revolve around four main steps:
These functionalities allow DemoGPT to transform user instructions into interactive applications, making it a powerful tool for LLM-based application development.
"},{"location":"#project-structure","title":"Project Structure","text":"The project is organized into several modules and files. Here's a brief overview of the project structure:
Please navigate through the documentation for a detailed understanding of the project.
"},{"location":"app/","title":"Streamlit Application Documentation","text":""},{"location":"app/#introduction","title":"Introduction","text":"This Python Streamlit application uses LogicModel
and StreamlitModel
from the model
module to generate and execute Python code based on user input. The user can input their idea, and the application will generate code, refine it, test it, and display the results. The Streamlit web app allows users to interact with the model in real time, which is particularly useful for demonstrating the capabilities of the models.
At the beginning of the application, all necessary modules such as streamlit
, model
, os
, logging
, webbrowser
, and signal
are imported. The logging level is set to DEBUG with the format 'levelname-message'.
The application tries to load environment variables using the dotenv
module. If the module is not present, it logs an error message but continues to execute the application.
The function generate_response
uses the LogicModel
to generate responses for the given text. It's a generator function yielding the output of the LogicModel
in each iteration.
The title of the Streamlit page is set using st.set_page_config
.
Input fields for the OpenAI API Key, demo title, and demo idea are created using st.sidebar.text_input
, st.text_input
, and st.text_area
respectively. The OpenAI API Key defaults to the value of the environment variable 'OPENAI_API_KEY'.
A form is created to handle the submission of user input. If the user submits the form, the application checks if a valid OpenAI API Key is entered. If not, it displays a warning message.
If the input is valid, instances of LogicModel
and StreamlitModel
are created with the provided OpenAI API Key.
The application then enters a loop where it generates, refines, tests and executes code using the LogicModel
. The progress of this process is displayed on a Streamlit progress bar.
If the code execution is successful, it launches a new Streamlit application running the generated code and opens the new application in the web browser.
In case the execution was not successful, the application refines the code and retries. If all attempts are unsuccessful, it reports a failure.
"},{"location":"src_plan/","title":"src/plan Module","text":"The src/plan
module is the core directory of the DemoGPT project. It contains the main application and the modules for the different stages of the DemoGPT pipeline.
app.py
: This is the main application file that starts the Streamlit application.cli.py
: This file is responsible for initiating the Streamlit application.model.py
: This file contains the modules corresponding to the plan, task, code generation, and code finalization stages of the DemoGPT pipeline.test_cases.py
: This file contains test examples to test the model.test.py
: This file contains the tests for the modules.utils.py
: This file contains helper modules to assist the pipeline.The chains
folder contains the files related to the task chains and their definitions.
chains.py
: This file includes the model definitions which are plan, tasks, and final.task_chains.py
: This file includes the implementations of all the available tasks.task_definitions.py
: This file includes definitions of all the available tasks.The prompts
folder under chains
contains all the necessary prompts for the models.
The src/plan
module is the heart of the DemoGPT project. It orchestrates the different stages of the pipeline, from planning to task creation, code snippet generation, and final code assembly. The chains
folder within this module contains the definitions and implementations of the tasks, as well as the prompts for the models. The test_cases.py
and test.py
files provide a suite of tests to ensure the correct functioning of the modules.
The src/plan/chains
module is a subdirectory of the src/plan
module in the DemoGPT project. It contains the files related to the task chains and their definitions.
chains.py
: This file includes the model definitions which are plan, tasks, and final.task_chains.py
: This file includes the implementations of all the available tasks.task_definitions.py
: This file includes definitions of all the available tasks.The prompts
folder under chains
contains all the necessary prompts for the models.
The src/plan/chains
module is a crucial part of the DemoGPT project. It contains the definitions and implementations of the tasks that are used in the DemoGPT pipeline. The chains.py
file includes the model definitions for the plan, tasks, and final stages of the pipeline. The task_chains.py
and task_definitions.py
files contain the implementations and definitions of all the available tasks, respectively. The prompts
folder contains the prompts for the models, which are used to guide the models in performing the tasks.
The src/plan/chains/prompts
module is a subdirectory of the src/plan/chains
module in the DemoGPT project. It contains the files related to the prompts for the models.
plan.py
: This file includes the prompt for plan generation.tasks.py
: This file includes the prompt for task generation.final.py
: This file includes the finalizer code which combines code snippets and generates the final Streamlit code.The task_list
folder under prompts
contains the prompts for the available tasks.
The src/plan/chains/prompts
module is a crucial part of the DemoGPT project. It contains the prompts that guide the models in performing the tasks in the DemoGPT pipeline. The plan.py
, tasks.py
, and final.py
files include the prompts for the plan generation, task generation, and finalization stages of the pipeline, respectively. The task_list
folder within prompts
contains the prompts for the available tasks.
The src/plan/chains/prompts/task_list
module is a subdirectory of the src/plan/chains/prompts
module in the DemoGPT project. It contains the files related to the tasks and their definitions.
hub_bash.py
: Executes bash commands and provides results.hub_meteo.py
: Provides weather forecasts, conditions, and related information.hub_pal_math.py
: Solves complex math problems and equations.hub_question_answering.py
: Extracts and provides specific information from files in response to questions.hub_summarize.py
: Summarizes long text into concise and relevant information.memory.py
: Stores and retrieves conversation history or contextual information.prompt_chat_template.py
: Generates intelligent text output, such as questions or responses, from a given context or input.prompt_list_parser.py
: Transforms the input text into a list.react.py
: Finds information online to answer user queries.router.py
: Routes queries to the appropriate handler based on context or type.ui_input_file.py
: Provides a mechanism for users to upload a file and return its content as string.ui_input_text.py
: Gets input from the user via a text field.ui_output_text.py
: Shows text output to the user.The src/plan/chains/prompts/task_list
module contains the definitions of all tasks used in the DemoGPT pipeline. Each task has a specific purpose and is good at performing a certain function. The tasks range from getting user input and showing output to the user, to generating intelligent text output, transforming text into a list, routing queries, answering questions that require external search on the web, summarizing long text, answering questions related to a file, solving math problems, executing bash commands, and providing weather-related information.
The src/plan
module is the core directory of the DemoGPT project. It contains the main application and the modules for the different stages of the DemoGPT pipeline.
app.py
: This is the main application file that starts the Streamlit application.cli.py
: This file is responsible for initiating the Streamlit application.model.py
: This file contains the modules corresponding to the plan, task, code generation, and code finalization stages of the DemoGPT pipeline.test_cases.py
: This file contains test examples to test the model.test.py
: This file contains the tests for the modules.utils.py
: This file contains helper modules to assist the pipeline.The chains
folder contains the files related to the task chains and their definitions.
chains.py
: This file includes the model definitions which are plan, tasks, and final.task_chains.py
: This file includes the implementations of all the available tasks.task_definitions.py
: This file includes definitions of all the available tasks.The prompts
folder under chains
contains all the necessary prompts for the models.
The src/plan
module is the heart of the DemoGPT project. It orchestrates the different stages of the pipeline, from planning to task creation, code snippet generation, and final code assembly. The chains
folder within this module contains the definitions and implementations of the tasks, as well as the prompts for the models. The test_cases.py
and test.py
files provide a suite of tests to ensure the correct functioning of the modules.
The src/plan/chains
module is a subdirectory of the src/plan
module in the DemoGPT project. It contains the files related to the task chains and their definitions.
chains.py
: This file includes the model definitions which are plan, tasks, and final.task_chains.py
: This file includes the implementations of all the available tasks.task_definitions.py
: This file includes definitions of all the available tasks.The prompts
folder under chains
contains all the necessary prompts for the models.
The src/plan/chains
module is a crucial part of the DemoGPT project. It contains the definitions and implementations of the tasks that are used in the DemoGPT pipeline. The chains.py
file includes the model definitions for the plan, tasks, and final stages of the pipeline. The task_chains.py
and task_definitions.py
files contain the implementations and definitions of all the available tasks, respectively. The prompts
folder contains the prompts for the models, which are used to guide the models in performing the tasks.
The src/plan/chains/prompts
module is a subdirectory of the src/plan/chains
module in the DemoGPT project. It contains the files related to the prompts for the models.
plan.py
: This file includes the prompt for plan generation.tasks.py
: This file includes the prompt for task generation.final.py
: This file includes the finalizer code which combines code snippets and generates the final Streamlit code.The task_list
folder under prompts
contains the prompts for the available tasks.
The src/plan/chains/prompts
module is a crucial part of the DemoGPT project. It contains the prompts that guide the models in performing the tasks in the DemoGPT pipeline. The plan.py
, tasks.py
, and final.py
files include the prompts for the plan generation, task generation, and finalization stages of the pipeline, respectively. The task_list
folder within prompts
contains the prompts for the available tasks.
The src/plan/chains/prompts/task_list
module is a subdirectory of the src/plan/chains/prompts
module in the DemoGPT project. It contains the files related to the tasks and their definitions.
hub_bash.py
: Executes bash commands and provides results.hub_meteo.py
: Provides weather forecasts, conditions, and related information.hub_pal_math.py
: Solves complex math problems and equations.hub_question_answering.py
: Extracts and provides specific information from files in response to questions.hub_summarize.py
: Summarizes long text into concise and relevant information.memory.py
: Stores and retrieves conversation history or contextual information.prompt_chat_template.py
: Generates intelligent text output, such as questions or responses, from a given context or input.prompt_list_parser.py
: Transforms the input text into a list.react.py
: Finds information online to answer user queries.router.py
: Routes queries to the appropriate handler based on context or type.ui_input_file.py
: Provides a mechanism for users to upload a file and return its content as string.ui_input_text.py
: Gets input from the user via a text field.ui_output_text.py
: Shows text output to the user.The src/plan/chains/prompts/task_list
module contains the definitions of all tasks used in the DemoGPT pipeline. Each task has a specific purpose and is good at performing a certain function. The tasks range from getting user input and showing output to the user, to generating intelligent text output, transforming text into a list, routing queries, answering questions that require external search on the web, summarizing long text, answering questions related to a file, solving math problems, executing bash commands, and providing weather-related information.