Skip to content

Commit ca6635b

Browse files
committed
add primary data project
1 parent 374c4a1 commit ca6635b

File tree

125 files changed

+48311
-26
lines changed

Some content is hidden

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

125 files changed

+48311
-26
lines changed

appkits/agentsway/src/agentsway/agents/doc_wrappers/__init__.py

Whitespace-only changes.

appkits/agentsway/src/agentsway/agents/doc_wrappers/doctling_wrapper.py

Whitespace-only changes.

appkits/agentsway/src/agentsway/agents/ds/__init__.py

Whitespace-only changes.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# 📊 AI Data Analysis Agent
2+
3+
An AI data analysis Agent built using the Agno Agent framework and Openai's gpt-4o model. This agent helps users analyze their data - csv, excel files through natural language queries, powered by OpenAI's language models and DuckDB for efficient data processing - making data analysis accessible to users regardless of their SQL expertise.
4+
5+
## Features
6+
7+
- 📤 **File Upload Support**:
8+
- Upload CSV and Excel files
9+
- Automatic data type detection and schema inference
10+
- Support for multiple file formats
11+
12+
- 💬 **Natural Language Queries**:
13+
- Convert natural language questions into SQL queries
14+
- Get instant answers about your data
15+
- No SQL knowledge required
16+
17+
- 🔍 **Advanced Analysis**:
18+
- Perform complex data aggregations
19+
- Filter and sort data
20+
- Generate statistical summaries
21+
- Create data visualizations
22+
23+
- 🎯 **Interactive UI**:
24+
- User-friendly Streamlit interface
25+
- Real-time query processing
26+
- Clear result presentation
27+
28+
## How to Run
29+
30+
1. **Setup Environment**
31+
```bash
32+
# Clone the repository
33+
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
34+
cd ai_agent_tutorials/ai_data_analysis_agent
35+
36+
# Install dependencies
37+
pip install -r requirements.txt
38+
```
39+
40+
2. **Configure API Keys**
41+
- Get OpenAI API key from [OpenAI Platform](https://platform.openai.com)
42+
43+
3. **Run the Application**
44+
```bash
45+
streamlit run ai_data_analyst.py
46+
```
47+
48+
## Usage
49+
50+
1. Launch the application using the command above
51+
2. Provide your OpenAI API key in the sidebar of Streamlit
52+
3. Upload your CSV or Excel file through the Streamlit interface
53+
4. Ask questions about your data in natural language
54+
5. View the results and generated visualizations
55+

appkits/agentsway/src/freeway/__init__.py

Whitespace-only changes.

appkits/agentsway/tests/__init__.py

Whitespace-only changes.
Binary file not shown.

appkits/agentsway/tests/doc_wrappers/__init__.py

Whitespace-only changes.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "initial_id",
7+
"metadata": {
8+
"collapsed": true
9+
},
10+
"outputs": [],
11+
"source": [
12+
""
13+
]
14+
}
15+
],
16+
"metadata": {
17+
"kernelspec": {
18+
"display_name": "Python 3",
19+
"language": "python",
20+
"name": "python3"
21+
},
22+
"language_info": {
23+
"codemirror_mode": {
24+
"name": "ipython",
25+
"version": 2
26+
},
27+
"file_extension": ".py",
28+
"mimetype": "text/x-python",
29+
"name": "python",
30+
"nbconvert_exporter": "python",
31+
"pygments_lexer": "ipython2",
32+
"version": "2.7.6"
33+
}
34+
},
35+
"nbformat": 4,
36+
"nbformat_minor": 5
37+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from agentsway.agents import doc_wrappers
2+
from pytest_bdd import scenario, given, when, then
3+
4+
5+
@scenario("Simple Convertion")
6+
def test_convert_to_markdown():
7+
result = doc_wrappers.covert_to_markdown("https://arxiv.org/pdf/2408.09869")
8+
print(result)
9+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Created by patrick at 2025/2/11
2+
Feature: Docling Examples
3+
Scenario: Simple Convertion
4+
# Enter steps here

appkits/agentsway/tests/fixtures.py

Whitespace-only changes.

appkits/agentway/scripts/pdf.sh

Whitespace-only changes.

appkits/agentway/src/agentway/services/__init__.py

Whitespace-only changes.

appkits/agentway/src/agentway/services/multimedia/__init__.py

Whitespace-only changes.

appkits/agentway/src/agentway/services/multimedia/utils.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/chat_with/__init__.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/chat_with/km/__init__.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/chat_with/km/chat_with_pdf.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/datafarm/__init__.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/datafarm/producthunt/__init__.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/datafarm/producthunt/models.py

Whitespace-only changes.

appkits/qpyapp/src/qpyllmapp/__init__.py

Whitespace-only changes.

appkits/qpyapp/src/qpyllmapp/ai_client/__init__.py

Whitespace-only changes.

appkits/qpyapp/src/qpycases/ai_client/deepseek_v3.py renamed to appkits/qpyapp/src/qpyllmapp/ai_client/deepseek_v3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import json
22
import os
3-
from typing import Dict
43

54
from dotenv import load_dotenv
65
from openai import OpenAI, BaseModel

appkits/qpyapp/src/qpyllmapp/math_tutorials/__init__.py

Whitespace-only changes.

appkits/qpyapp/tests/components/__init__.py

Whitespace-only changes.

appkits/qpyapp/tests/components/test_logger.py

Whitespace-only changes.

datafarm/datafeeds/src/datafeeds/sites/__init__.py

Whitespace-only changes.

datafarm/datafeeds/src/datafeeds/sites/bilibili/__init__.py

Whitespace-only changes.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import json
2+
3+
import requests
4+
5+
from .constans import *
6+
7+
8+
def make_bilibili_get_request(url, headers=None, cookies=None, params=None):
9+
"""
10+
Makes a request to the Bilibili API with the specified headers and cookies.
11+
12+
Args:
13+
url (str): The URL to request.
14+
headers (dict, optional): The request headers. Defaults to None.
15+
cookies (dict, optional): The cookies to include in the request. Defaults to None.
16+
17+
Returns:
18+
dict: The JSON response, or None if an error occurs.
19+
"""
20+
try:
21+
response = requests.get(url, headers=headers, cookies=cookies, params=params)
22+
response.raise_for_status()
23+
return response.json()
24+
except requests.exceptions.RequestException as e:
25+
print(f"Request Error: {e}")
26+
return None
27+
except json.JSONDecodeError as e:
28+
print(f"JSON Decode Error: {e}")
29+
return None
30+
except Exception as e:
31+
print(f"An unexpected error occurred: {e}")
32+
return None
33+
34+
35+
def make_bili_get_call(url, params=None):
36+
response = make_bilibili_get_request(url, headers=DEFAULT_HEADERS, cookies=DEFAULT_COOKIES, params=params)
37+
return response
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
DEFAULT_HEADERS = {
2+
'accept': '*/*',
3+
'accept-language': 'zh-CN,zh;q=0.9',
4+
'origin': 'https://www.bilibili.com',
5+
'priority': 'u=1, i',
6+
'referer': 'https://www.bilibili.com/video/BV1Qb421Y7SV/?vd_source=c668c05f4b5039b3290cec826cf03f14',
7+
'sec-ch-ua': '"Not A(Brand";v="8", "Chromium";v="132", "Google Chrome";v="132"',
8+
'sec-ch-ua-mobile': '?0',
9+
'sec-ch-ua-platform': '"macOS"',
10+
'sec-fetch-dest': 'empty',
11+
'sec-fetch-mode': 'cors',
12+
'sec-fetch-site': 'same-site',
13+
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36'
14+
}
15+
16+
DEFAULT_COOKIES = {
17+
'buvid3': '0C25C8A6-EA71-F822-F8E0-D989C2DE341079944infoc',
18+
# 'b_nut': '1740392079',
19+
# '_uuid': '9CDA82F10-3A85-696B-12EF-F7B110DFAF731080098infoc',
20+
# 'enable_web_push': 'DISABLE',
21+
# 'enable_feed_channel': 'DISABLE',
22+
# 'buvid4': '7B80DD12-10E3-9840-42AC-D6AF2434DC8A80488-025022410-CvOVun1%2BX15dfH4%2ByQODmg%3D%3D',
23+
# 'rpdid': '|(J~lkk|kkk|0J\'u~R|Jmku)l',
24+
# 'header_theme_version': 'CLOSE',
25+
# 'hit-dyn-v2': '1',
26+
# 'fingerprint': '26b9a5c72e7e719ce17094db143e7b87',
27+
# 'buvid_fp_plain': 'undefined',
28+
# 'buvid_fp': 'c1c5a9ace7d054c6d980668a8287e8ec',
29+
# 'b_lsid': '982F4621_195418713FC',
30+
# 'bili_ticket': 'eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDA4MjAzMzQsImlhdCI6MTc0MDU2MTA3NCwicGx0IjotMX0.kSm556YWR09NRAVgoilHdFMr19tpUlNe7IkIiyhCA3c',
31+
# 'bili_ticket_expires': '1740820274',
32+
# 'bp_t_offset_608721975': '1038191353193824256',
33+
'SESSDATA': 'ca456f57%2C1756113344%2C6b3cf*22CjDoIx2OyeG8Wt8dbXVwBEAYdEe5EEUviWR90Z6QtwR9ag0uEFL-uTOTZl8vhIbUaXQSVklwb1pyTXRQaERLY3NVSlVJR2hBTGR6TGpVUVJSY3NYTXJISnV5U3ZmQkkzQlRvU3liWTBVY1hqWWczcXQ2SXN3aVdUbDV1bmpzV01vdWs5MG53d3Z3IIEC',
34+
'bili_jct': '38028b3b1efc816095eba45955763581',
35+
# 'DedeUserID': '3546803955829068',
36+
# 'DedeUserID__ckMd5': '9ceb6008f1060048',
37+
# 'sid': '6stk7ud6',
38+
# 'home_feed_column': '4',
39+
# 'browser_resolution': '150-895',
40+
# 'CURRENT_FNVAL': '4048'
41+
}
42+
43+
view_url = 'https://api.bilibili.com/x/web-interface/view?bvid={bvid}'
44+
wbi_url = 'https://api.bilibili.com/x/player/wbi/v2'

0 commit comments

Comments
 (0)