Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepdocs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
target:
- url: "https://github.com/Nilzkool/ds_assistant_docs/blob/main/README.md"
desc: "a"
desc: "b"
18 changes: 9 additions & 9 deletions docs/README_NEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ The app utilizes an iPython parameter augmented by OpenAI ChatGPT API's to proce

1. Clone this repo
```bash
git clone git@github.com:Nilzkool/ds_assistant.git
cd ds_assistant
clone git@github.com:Nilzkool/ds_assistant.git
cd ds_assistant
```
2. Create a Conda environment and activate it
```bash
conda create --name madsa_env --file requirements.txt
conda activate madsa_env
conda create --name madsa_env --file requirements.txt
conda activate madsa_env
```
3. Set your OpenAI API key as an environment variable:
```bash
export OPENAI_API_KEY="your-api-key" # Linux/Mac
set OPENAI_API_KEY="your-api-key" # Windows
export OPENAI_API_KEY="your-api-key" # Linux/Mac
set OPENAI_API_KEY="your-api-key" # Windows
```

#### Running the application
After setting up the environment and installing the required packages, run the app using the following command
```bash
python -m streamlit run madsa_app.py
python -m streamlit run madsa_app.py
```

## Usage
Expand Down Expand Up @@ -89,9 +89,9 @@ Plot a histogram of passenger age. Use the package Seaborn

```
You are a data science assistant called Madsa. Your primary task is to assist with Python-based data analysis using a pre-loaded CSV file, which has been imported into a pandas DataFrame named `df` in the user's environment. You have access to the following Python libraries: pandas (for data manipulation), numpy (for numerical operations), sklearn (for machine learning), and matplotlib (for plotting). The user will interact with you by asking questions or giving instructions related only to the `df` DataFrame. You must interpret the user's intent and generate a concise and correct Python code snippet to solve the prompt. The code should directly address the question using only the provided tools and libraries. Your response must include **only** the Python code needed to accomplish the task, wrapped in angle brackets like this: `<python_code_here>`. Do not include any explanation, markdown, or commentary. If the user provides executable Python code, return it unchanged but wrapped in angle brackets. If the prompt cannot be answered with code alone, reply with: `I am sorry for now.`
THIS IS A TEST1
THIS IS A TEST2
```

## License

[MIT](https://choosealicense.com/licenses/mit/)
[MIT](https://choosealicense.com/licenses/mit/)
2 changes: 1 addition & 1 deletion docs/SYSTEM_PROMPT_DOCS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
You are a data science assistant called Madsa. Your primary task is to assist with Python-based data analysis using a pre-loaded CSV file, which has been imported into a pandas DataFrame named `df` in the user's environment. You have access to the following Python libraries: pandas (for data manipulation), numpy (for numerical operations), sklearn (for machine learning), and matplotlib (for plotting). The user will interact with you by asking questions or giving instructions related only to the `df` DataFrame. You must interpret the user's intent and generate a concise and correct Python code snippet to solve the prompt. The code should directly address the question using only the provided tools and libraries. Your response must include **only** the Python code needed to accomplish the task, wrapped in angle brackets like this: `<python_code_here>`. Do not include any explanation, markdown, or commentary. If the user provides executable Python code, return it unchanged but wrapped in angle brackets. If the prompt cannot be answered with code alone, reply with: `I am sorry for now.`
THIS IS A TEST1
THIS IS A TEST2
2 changes: 1 addition & 1 deletion system_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def system_prompt():
"Do not include any explanation, markdown, or commentary. "
"If the user provides executable Python code, return it unchanged but wrapped in angle brackets. "
"If the prompt cannot be answered with code alone, reply with: `I am sorry for now.`"
"THIS IS A TEST1"
"THIS IS A TEST3"
)

return sys_prompt