Skip to content

Commit cd42451

Browse files
committed
doc: readme, example query
1 parent b64473f commit cd42451

8 files changed

Lines changed: 46 additions & 4 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Usage
2+
3+
### docker
4+
5+
```bash
6+
docker run -d ghcr.io/ec-rag/ec-rag:latest -v path/to/your/config:/app/config.yaml
7+
```
8+
9+
### source code
10+
11+
```bash
12+
git clone https://github.com/EC-RAG/backend.git
13+
cd backend
14+
pip install -r requirements.txt
15+
python main.py
16+
```

app/routers/graph_route.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ async def gen_graph(ws: WebSocket):
2222
sql = await client.generate_sql()
2323
await ws.send_json({"type":'sql',"data": sql})
2424
data = client.load_data()
25-
print(convert_array_to_list(data.head().to_dict()))
2625
await ws.send_json({"type":'data',"data": {"data": convert_array_to_list(data.head().to_dict())}})
2726
res = await client.generate_graph()
2827
res = convert_array_to_list(res)

example/ex_config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
database:
2+
mysql:
3+
host: 127.0.0.1
4+
port: 3306
5+
user:
6+
password:
7+
8+
chromadb:
9+
name: chromadb.db
10+
11+
models:
12+
llm:
13+
type: deepseek
14+
api_key:
15+
model: deepseek-chat
16+
17+
embedding:
18+
base_url: https://ark.cn-beijing.volces.com/api/v3
19+
api_key:
20+
model: doubao-embedding-text-240715

example/ex_query.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ Q:查询奥利奥旗舰店的退款率
44

55
![1746786497331](images/ex_query/1746786497331.png)
66

7-
Q: 查询
7+
Q: 在测试表中 四月20日店铺A 三张种商品的销售额占比
8+
9+
![1746806441523](images/ex_query/1746806441523.png)
10+
11+
Q: 测试表种店铺B在四月一号到五号 商品ABC分别销量是多少
12+
13+
![1746806784426](images/ex_query/1746806784426.png)
56.4 KB
Loading
50 KB
Loading

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@
4444

4545
# 根据环境变量设置 reload 参数
4646
reload = env == "development"
47-
uvicorn.run('main:app', host="0.0.0.0", port=8000, reload=reload, workers=None)
47+
uvicorn.run('main:app', host="0.0.0.0", port=8188, reload=reload, workers=None)

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ langchain-openai
44
pandas
55
chromadb
66
pydantic
7-
pymysql
7+
pymysql
8+
loguru

0 commit comments

Comments
 (0)