Skip to content

Commit

Permalink
update the documentation strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Alleria1809 committed Jul 2, 2024
1 parent 4592a8b commit 6a7c675
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lightrag/lightrag/components/reasoning/chain_of_thought.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""
Chain of the thought(CoT) is to mimic a step-by-step thought process for arriving at the answer.
https://arxiv.org/abs/2201.11903, published in Jan, 2023
Chain of the thought(CoT) is to mimic a step-by-step thought process for arriving at the answer. You can achieve it in two ways:
Expand Down
2 changes: 2 additions & 0 deletions lightrag/lightrag/core/component.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Component is to LLM task pipelines what nn.Module is to PyTorch models."""

from collections import OrderedDict, namedtuple
from typing import (
Callable,
Expand Down
7 changes: 6 additions & 1 deletion lightrag/lightrag/core/default_prompt_template.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""This is the default system prompt template used in the LightRAG.
Use :ref:`Prompt <core-prompt_builder>` class to manage it.
"""

# TODO: potentially make a data class for this
LIGHTRAG_DEFAULT_PROMPT_ARGS = [
"task_desc_str", # task description
Expand Down Expand Up @@ -75,5 +80,5 @@
"""
"""This is the default system prompt template used in the LightRAG.
Use :ref:`Prompt<core-prompt_builder>` class to manage it.
Use :ref:`Prompt <core-prompt_builder>` class to manage it.
"""
3 changes: 3 additions & 0 deletions lightrag/lightrag/core/generator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""Generator is a user-facing orchestration component with a simple and unified interface for LLM prediction.
It is a pipeline that consists of three subcomponents."""
from typing import Any, Dict, List, Optional, Union
from copy import deepcopy
import logging
Expand Down
1 change: 1 addition & 0 deletions lightrag/lightrag/core/parameter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""WIP"""
from typing import Generic, TypeVar, Any

T = TypeVar("T") # covariant set to False to allow for in-place updates
Expand Down
3 changes: 3 additions & 0 deletions lightrag/lightrag/core/tokenizer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
Tokenizer from tiktoken.
"""
import tiktoken
from typing import List

Expand Down
3 changes: 3 additions & 0 deletions lightrag/lightrag/core/tool_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
The ToolManager manages a list of tools, context, and all ways to execute functions.
"""
from typing import List, Dict, Optional, Any, Callable, Awaitable, Union
import logging
from copy import deepcopy
Expand Down
4 changes: 3 additions & 1 deletion lightrag/lightrag/optim/llm_optimizer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
r"""
Based and optimized from ORPO llm optimizer: https://arxiv.org/abs/2309.03409
Based and optimized from ORPO llm optimizer.
https://arxiv.org/abs/2309.03409
Source code: https://github.com/google-deepmind/opro
"""

Expand Down

0 comments on commit 6a7c675

Please sign in to comment.