Skip to content

Commit 4148c14

Browse files
gventuriArslanSaleemshahrukh802
authored
Release/v2.2 (#1226)
* feat(pandasai_server): pandasai server code commit * fix(docker-compose): add pandasbi backend in docker * fix(pandasai-lint): sort linting errors * refactor: rename modle file name * feat(chat): adding chat endpoint * fix: remove some keywords from spellcheck * fix: poetry lock file * me api integrated * chat api integrated * renamed, fix and add documentation * workspace replaced * fix: add conversation id to response * feat(conversation): return all user conversations * fix: should be equal equal * feat(pandasai_server): pandasai server code commit (#1189) * feat(pandasai_server): pandasai server code commit * fix(docker-compose): add pandasbi backend in docker * fix(pandasai-lint): sort linting errors * refactor: rename modle file name * feat(chat): adding chat endpoint * fix: remove some keywords from spellcheck * fix: poetry lock file * me api integrated * chat api integrated * renamed, fix and add documentation * workspace replaced * fix: add conversation id to response * feat(conversation): return all user conversations * fix: should be equal equal --------- Co-authored-by: Shahrukh Khan <srkbannu@gmail.com> * get all datasets endpoint completed * feat(conversation_messages): return conversation messages (#1196) * get all datasets endpoint completed (#1197) * chore: update poetry.lock * chore: add pgdata to gitignore * chore: fix postgres url in the server .env example * chore: add .env.example for the client * fix: add rollbar * fix: wrong redirects * fix: docker compose to wait for postgres before starting (#1198) * fix: response message should be value for strings and numbers (#1199) * docs: mention the platform in the docs * style: hide rightbar for now * style: move the "new chat" button next to chat * [PAN-816]: Past conversations integrated and workspace removed (#1200) * feat(conversation_messages): return conversation messages * past conversations integrated * workspace page removed * workspace page removed * workspace page removed * workspace page removed * bugfix --------- Co-authored-by: ArslanSaleem <khan.arslan38@gmail.com> * style: remove tooltip from the sidebar * style: clean up the UI * chore: fix typo in volume name * conversation actions removed * conversation actions removed (#1201) * fix: filter out empty conversations * docs: add platform in the docs * get users by workspace id api added * docs: add docs about the platform * pydantic response for workspace user added * workspace datasets endpoint added * archive conversation api added (#1209) * [PAN-820]: archive api integrated on frontend (#1210) * archive conversation api added * archive conversation integrated on frontend * chore: add link about the roadmap * past conversation issues fixed * [PAN-824]: Ui stuck fixed (#1215) * ui stuck fixed * docker fixed * style: ctas in the sidebar fade out on collapse * scroll to bottom bug fix (#1217) * tests(pandasai): write python test cases (#1216) * new conversation not adding to sidebar fixed * fix: frontend docker build (#1219) * merge main to release --------- Co-authored-by: ArslanSaleem <khan.arslan38@gmail.com> Co-authored-by: Shahrukh Khan <srkbannu@gmail.com> Co-authored-by: Shahrukh khan <59122336+shahrukh802@users.noreply.github.com>
1 parent 3547329 commit 4148c14

222 files changed

Lines changed: 16108 additions & 50 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,6 @@ exports/
4242
# coverage
4343
.coverage
4444
coverage.xml
45+
46+
# pgdata
47+
pgdata/

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ format_diff: ## run code formatters in diff mode
3434
poetry run ruff --select I pandasai examples tests
3535

3636
spell_check: ## run codespell on the project
37-
poetry run codespell --toml pyproject.toml --skip=$(IGNORE_FORMATS) -L NotIn
37+
poetry run codespell --toml pyproject.toml --ignore-words=ignore-words.txt --skip=$(IGNORE_FORMATS)
3838

3939
spell_fix: ## run codespell on the project and fix the errors
40-
poetry run codespell --toml pyproject.toml --skip=$(IGNORE_FORMATS) -L NotIn -w
40+
poetry run codespell --toml pyproject.toml --ignore-words=ignore-words.txt --skip=$(IGNORE_FORMATS) -w
4141

4242
######################
4343
# DOCS

README.md

Lines changed: 49 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ![PandasAI](images/logo.png)
1+
# ![PandasAI](assets/logo.png)
22

33
[![Release](https://img.shields.io/pypi/v/pandasai?label=Release&style=flat-square)](https://pypi.org/project/pandasai/)
44
[![CI](https://github.com/gventuri/pandas-ai/actions/workflows/ci.yml/badge.svg)](https://github.com/gventuri/pandas-ai/actions/workflows/ci.yml/badge.svg)
@@ -8,13 +8,49 @@
88
[![Downloads](https://static.pepy.tech/badge/pandasai)](https://pepy.tech/project/pandasai) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
99
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ZnO-njhL7TBOYPZaqvMvGtsjckZKrv2E?usp=sharing)
1010

11-
PandasAI is a Python library that makes it easy to ask questions to your data in natural language. It helps you to explore, clean, and analyze your data using generative AI.
11+
PandasAI is a Python platform that makes it easy to ask questions to your data in natural language. It helps non-technical users to interact with their data in a more natural way, and it helps technical users to save time and effort when working with data.
12+
13+
# 🚀 Deploying PandasAI
14+
15+
PandasAI can be used in a variety of ways. You can easily use it in your Jupyter notebooks or streamlit apps, or you can deploy it as a REST API such as with FastAPI or Flask.
16+
17+
If you are interested in the managed PandasAI Cloud or our self-hosted Enterprise Offering, take a look at [our website](https://pandas-ai.com) or [book a meeting with us](https://zcal.co/gventuri/pandas-ai-demo).
1218

1319
# 🔧 Getting started
1420

15-
The documentation for PandasAI to use it with specific LLMs, vector stores and connectors, can be found [here](https://pandas-ai.readthedocs.io/en/latest/).
21+
You can find the full documentation for PandasAI [here](https://pandas-ai.readthedocs.io/en/latest/).
22+
23+
You can either decide to use PandasAI in your Jupyter notebooks, streamlit apps, or use the client and server architecture from the repo.
24+
25+
## ☁️ Using the platform
26+
27+
[![PandasAI platform](assets/demo.gif?raw=true)](https://www.youtube.com/watch?v=kh61wEy9GYM)
28+
29+
### 📦 Installation
30+
31+
PandasAI platform is uses a dockerized client-server architecture. You will need to have Docker installed in your machine.
32+
33+
```bash
34+
git clone https://github.com/sinaptik-ai/pandas-ai/
35+
cd pandas-ai
36+
docker-compose build
37+
```
38+
39+
### 🚀 Running the platform
1640

17-
## 📦 Installation
41+
Once you have built the platform, you can run it with:
42+
43+
```bash
44+
docker-compose up
45+
```
46+
47+
This will start the client and server, and you can access the client at `http://localhost:3000`.
48+
49+
## 📚 Using the library
50+
51+
### 📦 Installation
52+
53+
You can install the PandasAI library using pip or poetry.
1854

1955
With pip:
2056

@@ -28,21 +64,15 @@ With poetry:
2864
poetry add pandasai
2965
```
3066

31-
## 🔍 Demo
67+
### 🔍 Demo
3268

33-
Try out PandasAI yourself in your browser:
69+
Try out the PandasAI library yourself in your browser:
3470

3571
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ZnO-njhL7TBOYPZaqvMvGtsjckZKrv2E?usp=sharing)
3672

37-
# 🚀 Deploying PandasAI
38-
39-
PandasAI can be deployed in a variety of ways. You can easily use it in your Jupyter notebooks or streamlit apps, or you can deploy it as a REST API such as with FastAPI or Flask.
40-
41-
If you are interested in managed PandasAI Cloud or self-hosted Enterprise Offering, take a look at [our website](https://pandas-ai.com) or [book a meeting with us](https://zcal.co/gventuri/pandas-ai-demo).
42-
43-
## 💻 Usage
73+
### 💻 Usage
4474

45-
### Ask questions
75+
#### Ask questions
4676

4777
```python
4878
import os
@@ -52,7 +82,7 @@ from pandasai import Agent
5282
# Sample DataFrame
5383
sales_by_country = pd.DataFrame({
5484
"country": ["United States", "United Kingdom", "France", "Germany", "Italy", "Spain", "Canada", "Australia", "Japan", "China"],
55-
"sales": [5000, 3200, 2900, 4100, 2300, 2100, 2500, 2600, 4500, 7000]
85+
"revenue": [5000, 3200, 2900, 4100, 2300, 2100, 2500, 2600, 4500, 7000]
5686
})
5787

5888
# By default, unless you choose a different LLM, it will use BambooLLM.
@@ -81,19 +111,19 @@ agent.chat(
81111
The total sales for the top 3 countries by sales is 16500.
82112
```
83113

84-
### Visualize charts
114+
#### Visualize charts
85115

86116
You can also ask PandasAI to generate charts for you:
87117

88118
```python
89119
agent.chat(
90-
"Plot the histogram of countries showing for each the gdp, using different colors for each bar",
120+
"Plot the histogram of countries showing for each one the gd. Use different colors for each bar",
91121
)
92122
```
93123

94-
![Chart](images/histogram-chart.png?raw=true)
124+
![Chart](assets/histogram-chart.png?raw=true)
95125

96-
### Multiple DataFrames
126+
#### Multiple DataFrames
97127

98128
You can also pass in multiple dataframes to PandasAI and ask questions relating them.
99129

assets/demo.gif

2.84 MB
Loading
File renamed without changes.

client/.env.example

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# THE URL OF YOUR CLIENT
2+
NEXT_PUBLIC_API_URL='http://localhost:8000/'
3+
4+
# ENVIRONMENT
5+
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN="development"
6+
7+
# ANALYTICS
8+
NEXT_PUBLIC_MIXPANEL_TOKEN="04a81d58ade99299e19e5a89fe84c670"
9+
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="G-SD7MBGS6J9"
10+
11+
# SUPPORT CHAT
12+
NEXT_PUBLIC_INTERCOM_APP_ID="jzfk3qc5"
13+
14+
# ENV
15+
NODE_ENV="development"

client/.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"next/core-web-vitals",
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:react/recommended"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": 2023,
15+
"sourceType": "module"
16+
},
17+
"plugins": [
18+
"@typescript-eslint",
19+
"react"
20+
],
21+
"rules": {
22+
"react/no-unescaped-entities": ["error", { "forbid": [">", "}"] }],
23+
"@typescript-eslint/no-explicit-any": "off",
24+
"no-useless-catch": "off",
25+
"react-hooks/exhaustive-deps": 0
26+
}
27+
}

client/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
.env
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
37+
38+
# lock files
39+
package-lock.json
40+
yarn-lock.json

client/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:19.4.0-alpine3.17
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
7+
RUN npm install
8+
9+
COPY . .
10+
11+
RUN npm run build
12+
13+
EXPOSE 3000
14+
15+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)