Skip to content

Commit

Permalink
Merge pull request #87 from harishmohanraj/review-fixes
Browse files Browse the repository at this point in the history
Review fixes
  • Loading branch information
harishmohanraj authored Jan 20, 2025
2 parents 22544ae + 4701e27 commit 9a98378
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
2 changes: 0 additions & 2 deletions .devcontainer/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.d
RUN apt-get update && apt-get -y update
# added vim and nano for convenience
RUN apt-get install -y sudo git npm vim nano curl wget git-lfs
# need the below packages for the documentation
RUN apt-get install -y sudo libpq-dev postgresql-server-dev-all

# Setup a non-root user 'autogen' with sudo access
RUN adduser --home /home/autogen --disabled-password --gecos '' autogen
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy-website-mintlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
uv pip install --system databind.core==4.4.2 databind.json==4.4.2
Expand Down Expand Up @@ -88,7 +87,6 @@ jobs:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
uv pip install --system databind.core==4.4.2 databind.json==4.4.2
Expand Down
6 changes: 3 additions & 3 deletions notebook/agentchat_MathChat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"source": [
"### Example 1\n",
"\n",
"Problem: Find all $x$ that satisfy the inequality $(2x+10)(x+3)<(3x+9)(x+8)$. Express your answer in interval notation.\n",
"Problem: Find all $x$ that satisfy the inequality `$(2x+10)(x+3)<(3x+9)(x+8)$`. Express your answer in interval notation.\n",
"\n",
"Correct Solution: \n",
"We have \\begin{align*} (2x+10)(x+3)&<(3x+9)(x+8) \\quad \\Rightarrow\n",
Expand All @@ -145,7 +145,7 @@
"\\\\ (2x+10-(3x+24))(x+3)&<0 \\quad \\Rightarrow\n",
"\\\\ (-x-14)(x+3)&<0 \\quad \\Rightarrow\n",
"\\\\ (x+14)(x+3)&>0.\n",
"\\end{align*} This inequality is satisfied if and only if $(x+14)$ and $(x+3)$ are either both positive or both negative. Both factors are positive for $x>-3$ and both factors are negative for $x<-14$. When $-14<x<-3$, one factor is positive and the other negative, so their product is negative. Therefore, the range of $x$ that satisfies the inequality is $ \\boxed{(-\\infty, -14)\\cup(-3,\\infty)} $."
"\\end{align*} This inequality is satisfied if and only if $(x+14)$ and $(x+3)$ are either both positive or both negative. Both factors are positive for $x>-3$ and both factors are negative for `$x<-14$`. When `$-14<x<-3$`, one factor is positive and the other negative, so their product is negative. Therefore, the range of $x$ that satisfies the inequality is $ \\boxed{(-\\infty, -14)\\cup(-3,\\infty)} $."
]
},
{
Expand Down Expand Up @@ -971,7 +971,7 @@
"Problem: Find all numbers $a$ for which the graph of $y=x^2+a$ and the graph of $y=ax$ intersect. Express your answer in interval notation.\n",
"\n",
"\n",
"Correct Solution: If these two graphs intersect then the points of intersection occur when \\[x^2+a=ax,\\] or \\[x^2-ax+a=0.\\] This quadratic has solutions exactly when the discriminant is nonnegative: \\[(-a)^2-4\\cdot1\\cdot a\\geq0.\\] This simplifies to \\[a(a-4)\\geq0.\\] This quadratic (in $a$) is nonnegative when $a$ and $a-4$ are either both $\\ge 0$ or both $\\le 0$. This is true for $a$ in $$(-\\infty,0]\\cup[4,\\infty).$$ Therefore the line and quadratic intersect exactly when $a$ is in $\\boxed{(-\\infty,0]\\cup[4,\\infty)}$.\n"
"Correct Solution: If these two graphs intersect then the points of intersection occur when \\[x^2+a=ax,\\] or \\[x^2-ax+a=0.\\] This quadratic has solutions exactly when the discriminant is nonnegative: \\[(-a)^2-4\\cdot1\\cdot a\\geq0.\\] This simplifies to \\[a(a-4)\\geq0.\\] This quadratic (in $a$) is nonnegative when $a$ and $a-4$ are either both $\\ge 0$ or both $\\le 0$. This is true for $a$ in $$(-\\infty,0]\\cup[4,\\infty).$$ Therefore the line and quadratic intersect exactly when $a$ is in `$\\boxed{(-\\infty,0]\\cup[4,\\infty)}$`.\n"
]
},
{
Expand Down
8 changes: 0 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,6 @@ test = [

# docs dependencies
docs = [
"pdoc3>=0.11.5",
"pyyaml>=6.0.2",
"termcolor>=2.5.0",
"nbclient>=0.10.2",
"arxiv>=2.1.3",
"flaml[automl]",
"pygraphviz>=1.14",
"replicate",
"pyautogen[retrievechat-mongodb, retrievechat-pgvector, retrievechat-qdrant, anthropic, cosmosdb, neo4j, jupyter-executor, anthropic, bedrock, cerebras, cohere, gemini, groq, mistral, ollama, together]",
]

Expand Down
35 changes: 24 additions & 11 deletions scripts/docs_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,57 @@ install_graphviz_mac() {
echo "Error: Homebrew is not installed. Please install Homebrew first."
echo "You can install Homebrew by running:"
echo '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'
return 1
exit 1
fi
}

install_graphviz_ubuntu() {
if command -v apt-get >/dev/null 2>&1; then
echo "Installing Graphviz on Ubuntu..."
sudo apt-get update
sudo apt-get update && \
sudo apt-get install -y graphviz graphviz-dev
else
echo "Error: apt-get not found. Are you sure this is a Debian/Ubuntu system?"
return 1
exit 1
fi
}

# Detect OS and run appropriate installation function
install_graphviz() {
if [[ "$OSTYPE" == "darwin"* ]]; then
install_graphviz_mac
elif [[ -f /etc/os-release ]] && grep -q -i "ubuntu\|debian" /etc/os-release; then
install_graphviz_ubuntu
else
echo "Unsupported operating system"
return 1
exit 1
fi
}

# Function to build documentation
docs_build() {
install_graphviz
install_packages() {
pip install -e ".[docs]"
pip install falkordb graphrag_sdk neo4j-graphrag pypdf && \
cd website && \
pip install "falkordb" "graphrag_sdk" "neo4j-graphrag" "pypdf" \
"pdoc3>=0.11.5" \
"pyyaml>=6.0.2" \
"termcolor>=2.5.0" \
"nbclient>=0.10.2" \
"arxiv>=2.1.3" \
"flaml[automl]" \
"pygraphviz>=1.14" \
"replicate"
}

docs_generate() {
cd website && \
python ./process_api_reference.py && \
python ./process_notebooks.py render
}

# Execute the function only if the script is run directly
docs_build() {
install_graphviz && \
install_packages && \
docs_generate
}

if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
docs_build
fi

0 comments on commit 9a98378

Please sign in to comment.