Skip to content

Commit

Permalink
Merge pull request #85 from SylphAI-Inc/release
Browse files Browse the repository at this point in the history
[Document Fix]
  • Loading branch information
Alleria1809 authored Jul 5, 2024
2 parents e7c2a1e + 82f751b commit a3b8503
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 37 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Net(nn.Module):
## LightRAG Task Pipeline


We will ask the model to respond with ``explaination`` and ``example`` of a concept. And we will build a pipeline to get the structured output as ``QAOutput``.
We will ask the model to respond with ``explanation`` and ``example`` of a concept. And we will build a pipeline to get the structured output as ``QAOutput``.

```python

Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ update_files:
@python $(SOURCEDIR)/insert_labels.py
@echo "Removing unnecessary strings for better formatting"
@python $(SOURCEDIR)/remove_string.py
#@echo "Removing duplicated files"
# @python $(SOURCEDIR)/remove_files.py
@echo "Removing duplicated files"
@python $(SOURCEDIR)/remove_files.py
@echo "Renaming and updating file"
@python $(SOURCEDIR)/change_api_file_name.py

Expand Down
Binary file modified docs/source/_static/images/LightRAG-logo-doc.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 2 additions & 34 deletions docs/source/remove_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,21 @@ def remove_file(directory: str):

# remove modules.rst
try:
for filename in os.listdir(directory):
for _ in os.listdir(directory):
module_file = os.path.join(directory, "modules.rst")
os.remove(module_file)
except Exception:
print(f"No modules.rst to remove in {directory}")

# remove components.rst, core.rst, prompt.rst, ...
try:
for filename in os.listdir(directory):
for _ in os.listdir(directory):
name = directory.split("/")[-1] + ".rst"
module_file = os.path.join(directory, name)
os.remove(module_file)
except Exception:
print(f"No {name} to remove in {directory}")

# remove api files to avoid showing duplicated section

target_files = [
"components.model_client.openai_client.rst",
"components.retriever.faiss_retriever.rst",
"components.reasoning.chain_of_thought.rst",
"components.model_client.groq_client.rst",
"components.retriever.bm25_retriever.rst",
"components.model_client.google_client.rst",
"components.model_client.transformers_client.rst",
"components.model_client.utils.rst",
"components.retriever.llm_retriever.rst",
"components.agent.react.rst",
"components.model_client.anthropic_client.rst",
"components.output_parsers.outputs.rst",
"components.model_client.cohere_client.rst",
"components.retriever.reranker_retriever.rst",
"components.data_process.data_components.rst",
"components.data_process.text_splitter.rst",
"components.memory.memory.rst",
# "components.retriever.postgres_retriever.rst",
]
try:
for filename in os.listdir(directory):
if filename in target_files:
filepath = os.path.join(directory, filename)
os.remove(filepath)
print(f"{filepath} is removed")
except Exception:
print(f"No target files to remove in {directory}")


remove_file("./source/apis/components")
remove_file("./source/apis/core")
remove_file("./source/apis/eval")
Expand Down

0 comments on commit a3b8503

Please sign in to comment.