Skip to content

Commit

Permalink
Migrates ai/docbot to uv to manage dependencies (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen authored Aug 24, 2024
1 parent 2cb9343 commit 4087683
Show file tree
Hide file tree
Showing 4 changed files with 2,168 additions and 9 deletions.
5 changes: 4 additions & 1 deletion ai/docbot/deploy_to_hf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ if [ ! -d "$DEST_PATH" ]; then
mkdir -p "$DEST_PATH"
fi

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Build the docs index
cd ai/docbot && python docs_index.py --build-index && cd -
cd ai/docbot && uv run docs_index.py --build-index && cd -

# Get the path of this script which is the demo dir.
DEMO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down
21 changes: 21 additions & 0 deletions ai/docbot/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[project]
name = "docbot"
version = "0.1.0"
description = "A chatbot for docs"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"gunicorn>=23.0.0",
"nest-asyncio>=1.6.0",
"llama-index==0.10.68",
"google-generativeai>=0.5.4",
"llama-index-llms-gemini==0.2.0",
"llama-index-embeddings-google==0.1.6",
"llama-index-retrievers-bm25==0.2.2",
"mesop>=0.12.2",
]

[tool.uv]
dev-dependencies = []

[tool.uv.workspace]
8 changes: 0 additions & 8 deletions ai/docbot/requirements.txt

This file was deleted.

Loading

0 comments on commit 4087683

Please sign in to comment.