Skip to content

Commit 4087683

Browse files
authored
Migrates ai/docbot to uv to manage dependencies (#832)
1 parent 2cb9343 commit 4087683

File tree

4 files changed

+2168
-9
lines changed

4 files changed

+2168
-9
lines changed

ai/docbot/deploy_to_hf.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ if [ ! -d "$DEST_PATH" ]; then
2222
mkdir -p "$DEST_PATH"
2323
fi
2424

25+
# Install uv
26+
curl -LsSf https://astral.sh/uv/install.sh | sh
27+
2528
# Build the docs index
26-
cd ai/docbot && python docs_index.py --build-index && cd -
29+
cd ai/docbot && uv run docs_index.py --build-index && cd -
2730

2831
# Get the path of this script which is the demo dir.
2932
DEMO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

ai/docbot/pyproject.toml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[project]
2+
name = "docbot"
3+
version = "0.1.0"
4+
description = "A chatbot for docs"
5+
readme = "README.md"
6+
requires-python = ">=3.10"
7+
dependencies = [
8+
"gunicorn>=23.0.0",
9+
"nest-asyncio>=1.6.0",
10+
"llama-index==0.10.68",
11+
"google-generativeai>=0.5.4",
12+
"llama-index-llms-gemini==0.2.0",
13+
"llama-index-embeddings-google==0.1.6",
14+
"llama-index-retrievers-bm25==0.2.2",
15+
"mesop>=0.12.2",
16+
]
17+
18+
[tool.uv]
19+
dev-dependencies = []
20+
21+
[tool.uv.workspace]

ai/docbot/requirements.txt

-8
This file was deleted.

0 commit comments

Comments
 (0)