Skip to content

Commit

Permalink
start to track documents
Browse files Browse the repository at this point in the history
  • Loading branch information
liyin2015 committed Jul 1, 2024
1 parent 7399ae4 commit 284e216
Show file tree
Hide file tree
Showing 195 changed files with 2,953 additions and 712 deletions.
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ repos:
rev: 24.4.2
hooks:
- id: black
args: ["--line-length=88"]
args: ['--line-length=88']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
hooks:
# Run the linter.
- id: ruff
args: ["--fix", "--extend-ignore=E402"]
args: ['--fix', '--extend-ignore=E402']
# - repo: https://github.com/pycqa/flake8
# rev: 4.0.1
# hooks:
# - id: flake8
# args: ['--max-line-length=88']
File renamed without changes.
2 changes: 1 addition & 1 deletion developer_notes/generator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"source": [
"from lightrag.core import Component, Generator, Prompt\n",
"from lightrag.components.model_client import GroqAPIClient\n",
"from lightrag.utils import setup_env\n",
"from lightrag.utils import setup_env # noqa\n",
"\n",
"\n",
"class SimpleQA(Component):\n",
Expand Down
1 change: 0 additions & 1 deletion developer_notes/generator_note.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from lightrag.core import Component, Generator
from lightrag.components.model_client import GroqAPIClient
from lightrag.utils import setup_env # noqa


class SimpleQA(Component):
Expand Down
30 changes: 15 additions & 15 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
source/apis/components/components*
source/apis/components/_autosummary*
source/apis/components/modules*
source/apis/core/core*
source/apis/core/modules*
source/apis/eval/eval*
source/apis/eval/modules*
source/apis/prompts/prompts*
source/apis/prompts/modules*
source/apis/utils/utils*
source/apis/utils/modules*
source/apis/tracing/tracing*
source/apis/tracing/modules*
source/apis/optim/optim*
source/apis/optim/modules*
# source/apis/components/components*
# source/apis/components/_autosummary*
# source/apis/components/modules*
# source/apis/core/core*
# source/apis/core/modules*
# source/apis/eval/eval*
# source/apis/eval/modules*
# source/apis/prompts/prompts*
# source/apis/prompts/modules*
# source/apis/utils/utils*
# source/apis/utils/modules*
# source/apis/tracing/tracing*
# source/apis/tracing/modules*
# source/apis/optim/optim*
# source/apis/optim/modules*
14 changes: 7 additions & 7 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

apidoc:
@sphinx-apidoc -o $(APIDOCOUTDIR)/core ../lightrag/core --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/components ../lightrag/components --separate --force --templatedir=$(SOURCEDIR)/_templates
@sphinx-apidoc -o $(APIDOCOUTDIR)/eval ../lightrag/eval --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/optim ../lightrag/optim --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/utils ../lightrag/utils --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/tracing ../lightrag/tracing --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/core ../lightrag/lightrag/core --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/components ../lightrag/lightrag/components --separate --force --templatedir=$(SOURCEDIR)/_templates
@sphinx-apidoc -o $(APIDOCOUTDIR)/eval ../lightrag/lightrag/eval --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/optim ../lightrag/lightrag/optim --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/utils ../lightrag/lightrag/utils --separate --force
@sphinx-apidoc -o $(APIDOCOUTDIR)/tracing ../lightrag/lightrag/tracing --separate --force
@echo "Inserting reference labels into RST files."
@python $(SOURCEDIR)/insert_labels.py
@echo "Removing unnecessary strings for better formatting"
Expand All @@ -38,4 +38,4 @@ apidoc:


html: apidoc
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3 changes: 3 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
width: 270px; /* Adjust the width for larger screens */
}
}
.pre {
color: #0a7d91; /* Change the color of ```` blocks */
}

/* .copyright {
text-align: center;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
components.agent.react
======================

.. automodule:: components.agent.react











.. rubric:: Classes

.. autosummary::

ReActAgent
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _components-api_client-anthropic_client:

components.api\_client.anthropic\_client
========================================

.. automodule:: components.api_client.anthropic_client











.. rubric:: Classes

.. autosummary::

AnthropicAPIClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _components-api_client-google_client:

components.api\_client.google\_client
=====================================

.. automodule:: components.api_client.google_client











.. rubric:: Classes

.. autosummary::

GoogleGenAIClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _components-api_client-groq_client:

components.api\_client.groq\_client
===================================

.. automodule:: components.api_client.groq_client











.. rubric:: Classes

.. autosummary::

GroqAPIClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _components-api_client-openai_client:

components.api\_client.openai\_client
=====================================

.. automodule:: components.api_client.openai_client











.. rubric:: Classes

.. autosummary::

OpenAIClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _components-api_client-transformers_client:

components.api\_client.transformers\_client
===========================================

.. automodule:: components.api_client.transformers_client







.. rubric:: Functions

.. autosummary::

average_pool





.. rubric:: Classes

.. autosummary::

TransformerEmbedder
TransformersClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
components.data\_process.data\_components
=========================================

.. automodule:: components.data_process.data_components







.. rubric:: Functions

.. autosummary::

retriever_output_to_context_str





.. rubric:: Classes

.. autosummary::

RetrieverOutputToContextStr
ToEmbeddings
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _components-data_process-document_splitter:

components.data\_process.document\_splitter
===========================================

.. automodule:: components.data_process.document_splitter







.. rubric:: Functions

.. autosummary::

split_text_by_token_fn





.. rubric:: Classes

.. autosummary::

DocumentSplitter
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
components.data\_process.text\_splitter
=======================================

.. automodule:: components.data_process.text_splitter











.. rubric:: Classes

.. autosummary::

TextSplitter
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
components.memory.memory
========================

.. automodule:: components.memory.memory











.. rubric:: Classes

.. autosummary::

Memory
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
components.model\_client.anthropic\_client
==========================================

.. automodule:: components.model_client.anthropic_client











.. rubric:: Classes

.. autosummary::

AnthropicAPIClient
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
components.model\_client.cohere\_client
=======================================

.. automodule:: components.model_client.cohere_client











.. rubric:: Classes

.. autosummary::

CohereAPIClient
Loading

0 comments on commit 284e216

Please sign in to comment.