Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][Merge main into release] #148

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3a09bd0
update the banner, adjust the size according to screen
Alleria1809 Jul 19, 2024
67de092
remove downloads from readme
liyin2015 Jul 19, 2024
b50fc56
Merge remote-tracking branch 'origin/main' into xiaoyi
Alleria1809 Jul 19, 2024
e3bea0e
adjust css for smaller screen
Alleria1809 Jul 19, 2024
fbb8422
adjust css for smaller screen
Alleria1809 Jul 19, 2024
196fb49
remove unused lines
Alleria1809 Jul 19, 2024
5b84d24
fix bug https://github.com/SylphAI-Inc/LightRAG/issues/134
liyin2015 Jul 19, 2024
2e85f66
add support of data class and Enum
liyin2015 Jul 19, 2024
55d76e4
clean up test
liyin2015 Jul 19, 2024
a3d6de3
Merge pull request #135 from SylphAI-Inc/li
Sylph-AI Jul 19, 2024
af4476e
list models, retrievers, and agents supported on the home page
liyin2015 Jul 19, 2024
c4493a5
Merge pull request #136 from SylphAI-Inc/li
Sylph-AI Jul 19, 2024
87527dd
format css
Alleria1809 Jul 20, 2024
93126c2
Added additional documentation to ollama_client.py
PhiBrandon Jul 20, 2024
dec0292
formatted ollama_client documentation
PhiBrandon Jul 20, 2024
01fe96a
remove copy
Alleria1809 Jul 20, 2024
369185d
rename LightRAG to LightFlow at Readme first
liyin2015 Jul 21, 2024
661a4ad
rename LightRAG to LightFlow at Readme first
liyin2015 Jul 21, 2024
ef941a2
first lightflow logo
liyin2015 Jul 21, 2024
61c17c5
Merge pull request #139 from SylphAI-Inc/li
Sylph-AI Jul 21, 2024
915ac5a
rename lightrag to adalflow
liyin2015 Jul 21, 2024
6d5438d
Merge pull request #140 from SylphAI-Inc/li
Sylph-AI Jul 21, 2024
83711c5
add padding for better layout
Alleria1809 Jul 21, 2024
290fb89
add flexible banner
Alleria1809 Jul 21, 2024
b7769e6
Merge pull request #137 from SylphAI-Inc/xiaoyi
Alleria1809 Jul 22, 2024
50170ea
Merge pull request #138 from PhiBrandon/ollama_documentation
liyin2015 Jul 22, 2024
34bd02f
update the workflow to fix the package dependency problem, fix the mi…
Alleria1809 Jul 22, 2024
83ee041
Merge pull request #145 from SylphAI-Inc/xiaoyi
Alleria1809 Jul 22, 2024
b2082dd
Merge remote-tracking branch 'origin/release' into release
Alleria1809 Jul 22, 2024
c24c428
update the progress statement
Alleria1809 Jul 22, 2024
43c4e21
Merge pull request #147 from SylphAI-Inc/merge-main-into-release
Alleria1809 Jul 22, 2024
3e1a51d
test the deployment
Alleria1809 Jul 22, 2024
5a2b4e2
test the deployment
Alleria1809 Jul 22, 2024
63acaa7
test the deployment
Alleria1809 Jul 22, 2024
b5dca70
test the deployment
Alleria1809 Jul 22, 2024
4ad31c4
test the deployment
Alleria1809 Jul 22, 2024
e15681a
test the deployment
Alleria1809 Jul 23, 2024
413b2eb
test the deployment
Alleria1809 Jul 23, 2024
0d881fa
test the deployment
Alleria1809 Jul 23, 2024
aa342bf
test the deployment
Alleria1809 Jul 23, 2024
87358e9
test the deployment
Alleria1809 Jul 23, 2024
b5993a5
test the deployment
Alleria1809 Jul 23, 2024
99ed1e6
test the deployment
Alleria1809 Jul 23, 2024
fe67252
test the deployment
Alleria1809 Jul 23, 2024
f3592f6
test the deployment
Alleria1809 Jul 23, 2024
36d8d0b
test the deployment
Alleria1809 Jul 23, 2024
11453d8
test the deployment
Alleria1809 Jul 23, 2024
09a93d8
test the deployment
Alleria1809 Jul 23, 2024
017019f
test the deployment
Alleria1809 Jul 23, 2024
8e9c896
test the deployment
Alleria1809 Jul 23, 2024
50a922f
test the deployment
Alleria1809 Jul 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ jobs:
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH # Ensure Poetry's bin directory is in PATH

- name: Install package dependencies using Poetry
run: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think this is correct at all.

you need to

cd docs
poetry install

cd lightrag
poetry config virtualenvs.create false # Avoid creating a virtual environment
poetry install --all-extras --verbose # Install all optional dependencies
cd .. # Change back to the root directory

- name: Install documentation dependencies using Poetry
run: |
cd docs
poetry config virtualenvs.create false # Avoid creating a virtual environment
poetry install # Install only the doc dependencies as specified in pyproject.toml
poetry install --only doc # Install only the doc dependencies as specified in pyproject.toml

- name: Build documentation using Makefile
run: |
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/documentation_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Documentation

on:
push:
branches:
- merge-main-into-release # Trigger the workflow when changes are pushed to the release branch

permissions:
contents: write
actions: read

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # Ensure the Python version is correct

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH # Ensure Poetry's bin directory is in PATH

- name: Install documentation dependencies using Poetry
run: |
cd docs
poetry config virtualenvs.create false # Avoid creating a virtual environment
poetry install --with doc # Install only the doc dependencies as specified in pyproject.toml
pip install nest-asyncio # manually install nest-asyncio
pip install torch # manually install torch
# pip install transformers # manually install transformers
poetry show
poetry show lightrag


- name: Build documentation using Makefile
run: |
echo "Building documentation from: $(pwd)"
ls -l # Debug: List current directory contents
poetry run make html # Run Makefile in docs directory to build HTML docs
working-directory: ${{ github.workspace }}/docs

- name: List built documentation
run: |
find ./docs/build/ -type f # List all files in the build directory
working-directory: ${{ github.workspace }}

- name: Create .nojekyll file
run: |
touch .nojekyll # Prevent GitHub Pages from ignoring files that start with an underscore
working-directory: ${{ github.workspace }}/docs/build

- name: Copy CNAME file
run: |
cp ${{ github.workspace }}/CNAME ${{ github.workspace }}/docs/build/CNAME || true
working-directory: ${{ github.workspace }}

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # GitHub token for authentication
publish_branch: gh-pages # Target branch for GitHub Pages deployment
publish_dir: ./docs/build/ # Directory containing the built documentation
user_name: github-actions[bot] # Username for the commit
user_email: github-actions[bot]@users.noreply.github.com # Email for the commit

# Uncomment below for debugging purposes
# - name: Debug Output
# run: |
# pwd # Print the current working directory
# ls -l ./build/ # List files in the build directory
# cat ./source/conf.py # Display the Sphinx configuration file
# working-directory: ${{ github.workspace }}/docs/build
56 changes: 42 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
![LightRAG Logo](https://raw.githubusercontent.com/SylphAI-Inc/LightRAG/main/docs/source/_static/images/LightRAG-logo-doc.jpeg)

<!-- <h4 align="center">
<img alt="AdalFlow logo" src="docs/source/_static/images/adalflow-logo.png" style="width: 100%;">
</h4> -->

<h4 align="center">
<img alt="AdalFlow logo" src="https://raw.githubusercontent.com/SylphAI-Inc/LightRAG/main/docs/source/_static/images/adalflow-logo.png" style="width: 100%;">
</h4>


<p align="center">
<a href="https://colab.research.google.com/drive/1TKw_JHE42Z_AWo8UuRYZCO2iuMgyslTZ?usp=sharing">
<img alt="Try Quickstart in Colab" src="https://colab.research.google.com/assets/colab-badge.svg">
</a>
</p>

<h4 align="center">
<p>
<a href="https://lightrag.sylph.ai/">Documentation</a> |
<a href="https://lightrag.sylph.ai/apis/components/components.model_client.html">Models</a> |
<a href="https://lightrag.sylph.ai/apis/components/components.retriever.html">Retrievers</a> |
<a href="https://lightrag.sylph.ai/apis/components/components.agent.html">Agents</a>
<p>
</h4>

<p align="center">
<a href="https://pypi.org/project/lightRAG">
<img alt="PyPI Version" src="https://img.shields.io/pypi/v/lightRAG?style=flat-square">
</a>
<a href="https://star-history.com/#SylphAI-Inc/LightRAG">
<img alt="GitHub stars" src="https://img.shields.io/github/stars/SylphAI-Inc/LightRAG?style=flat-square">
</a>
<a href="https://pypistats.org/packages/lightrag">
<img alt="PyPI Downloads" src="https://img.shields.io/pypi/dm/lightRAG?style=flat-square">
</a>
<a href="https://github.com/SylphAI-Inc/LightRAG/issues">
<img alt="Open Issues" src="https://img.shields.io/github/issues-raw/SylphAI-Inc/LightRAG?style=flat-square">
</a>
Expand All @@ -33,22 +47,34 @@
<img alt="Try Quickstart in Colab" src="https://colab.research.google.com/assets/colab-badge.svg">
</a> -->

<!-- <a href="https://pypistats.org/packages/lightrag">
<img alt="PyPI Downloads" src="https://img.shields.io/pypi/dm/lightRAG?style=flat-square">
</a> -->



<h1>
<p align="center">
AdalFlow: The Library for Large Language Model Applications
</p>
</h1>

AdalFlow helps developers build and optimize LLM task pipelines.
Embracing similar design pattern to PyTorch, AdalFlow is light, modular, and robust, with a 100% readable codebase.

### ⚡ The Lightning Library for Large Language Model Applications ⚡
Note: We are in the progress of renaming to adalflow from lightrag.

*LightRAG* helps developers build and optimize *Retriever-Agent-Generator* pipelines.
Embracing similar design pattern to *PyTorch*, LightRAG is *light*, *modular*, and *robust*, with a 100% readable codebase.
# AdalFlow: A Tribute to Ada Lovelace

AdalFlow is named in honor of [Ada Lovelace](https://en.wikipedia.org/wiki/Ada_Lovelace), the pioneering female mathematician who first recognized that machines could do more than just calculations. As a female-led team, we aim to inspire more women to enter the AI field.

# Why LightRAG?
# Why AdalFlow?

LLMs are like water; they can be shaped into anything, from GenAI applications such as chatbots, translation, summarization, code generation, and autonomous agents to classical NLP tasks like text classification and named entity recognition. They interact with the world beyond the model’s internal knowledge via retrievers, memory, and tools (function calls). Each use case is unique in its data, business logic, and user experience.

Because of this, no library can provide out-of-the-box solutions. Users must build towards their own use case. This requires the library to be modular, robust, and have a clean, readable codebase. The only code you should put into production is code you either 100% trust or are 100% clear about how to customize and iterate.

<!-- This is what LightRAG is: light, modular, and robust, with a 100% readable codebase. -->
<!-- This is what AdalFlow is: light, modular, and robust, with a 100% readable codebase. -->


Further reading: [How We Started](https://www.linkedin.com/posts/li-yin-ai_both-ai-research-and-engineering-use-pytorch-activity-7189366364694892544-Uk1U?utm_source=share&utm_medium=member_desktop),
Expand Down Expand Up @@ -81,7 +107,7 @@ class Net(nn.Module):
x = self.fc1(x)
return self.fc2(x)
``` -->
# LightRAG Task Pipeline
# AdalFlow Task Pipeline

We will ask the model to respond with ``explanation`` and ``example`` of a concept. To achieve this, we will build a simple pipeline to get the structured output as ``QAOutput``.

Expand Down Expand Up @@ -254,7 +280,7 @@ self.generator = Generator(

# Quick Install

Install LightRAG with pip:
Install AdalFlow with pip:

```bash
pip install lightrag
Expand All @@ -267,13 +293,15 @@ Please refer to the [full installation guide](https://lightrag.sylph.ai/get_star

# Documentation

LightRAG full documentation available at [lightrag.sylph.ai](https://lightrag.sylph.ai/):
AdalFlow full documentation available at [lightrag.sylph.ai](https://lightrag.sylph.ai/):
- [How We Started](https://www.linkedin.com/posts/li-yin-ai_both-ai-research-and-engineering-use-pytorch-activity-7189366364694892544-Uk1U?utm_source=share&utm_medium=member_desktop)
- [Introduction](https://lightrag.sylph.ai/)
- [Full installation guide](https://lightrag.sylph.ai/get_started/installation.html)
- [Design philosophy](https://lightrag.sylph.ai/tutorials/lightrag_design_philosophy.html)
- [Class hierarchy](https://lightrag.sylph.ai/tutorials/class_hierarchy.html)
- [Tutorials](https://lightrag.sylph.ai/tutorials/index.html)
- [Supported Models](https://lightrag.sylph.ai/apis/components/components.model_client.html)
- [Supported Retrievers](https://lightrag.sylph.ai/apis/components/components.retriever.html)
- [API reference](https://lightrag.sylph.ai/apis/index.html)


Expand All @@ -286,9 +314,9 @@ LightRAG full documentation available at [lightrag.sylph.ai](https://lightrag.sy
# Citation

```bibtex
@software{Yin2024LightRAG,
@software{Yin2024AdalFlow,
author = {Li Yin},
title = {{LightRAG: The Lightning Library for Large Language Model (LLM) Applications}},
title = {{AdalFlow: The Library for Large Language Model (LLM) Applications}},
month = {7},
year = {2024},
doi = {10.5281/zenodo.12639531},
Expand Down
Loading
Loading