docs[minor],community[patch]: Minor tutorial docs improvement, minor import error quick fix. (#22725)

minor changes to module import error handling and minor issues in
tutorial documents.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
This commit is contained in:
Zheng Robert Jia
2024-06-20 14:36:49 -05:00
committed by GitHub
parent 7545b1d29b
commit a349fce880
5 changed files with 42 additions and 11 deletions

View File

@@ -24,7 +24,7 @@ _IMPORT_RE = re.compile(
_CURRENT_PATH = Path(__file__).parent.absolute()
# Directory where generated markdown files are stored
_DOCS_DIR = _CURRENT_PATH / "docs"
_DOCS_DIR = _CURRENT_PATH.parent.parent / "docs"
def find_files(path):
@@ -75,6 +75,7 @@ def main():
for file in find_files(args.docs_dir):
file_imports = replace_imports(file)
print(file)
if file_imports:
# Use relative file path as key