Skip to content

Commit 7e99068

Browse files
committed
update documentation scripts
1 parent dc5af50 commit 7e99068

4 files changed

Lines changed: 11 additions & 136 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ dev = [
6565
"uvicorn==0.37.0",
6666
"ruff==0.6.5",
6767
"pre-commit==4.1.0",
68-
"jupyter==1.1.1",
6968
]
7069
test = [
7170
"pytest==8.3.4",

scripts/docs/configuration_header.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Configuration
1+
---
2+
title: Configuration file
3+
sidebar:
4+
label: "[lucide:file-text] Configuration file"
5+
order: 0
6+
---
27

38
OpenGateLLM requires configuring a configuration file. This defines models, dependencies, and settings parameters. Playground and API need a configuration file (could be the same file), see [API configuration](#api-configuration) and [Playground configuration](#playground-configuration).
49

scripts/docs/convert_notebooks_to_docs.py

Lines changed: 0 additions & 129 deletions
This file was deleted.

scripts/docs/generate_configuration_documentation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from app.core.configuration import ConfigFile as PlaygroundConfigFile # noqa: E402 # type: ignore
1212

1313
parser = argparse.ArgumentParser()
14-
parser.add_argument("--output", type=str, default=os.path.join("./docs/docs/getting-started/configuration_file.md"))
14+
parser.add_argument("--output", type=str, default=os.path.join("./docs/src/content/docs/configuration/configuration_file.md"))
1515

1616

1717
def get_documentation_data(title: str, data: list, properties: dict, defs: dict, header: str = "", level: int = 1):
@@ -46,7 +46,7 @@ def get_documentation_data(title: str, data: list, properties: dict, defs: dict,
4646
header=ref.get("description"),
4747
level=level + 1,
4848
)
49-
description += f" For details of configuration, see the [{ref_key} section](#{ref_key.lower().replace(" ", "-")})."
49+
description += f" For details of configuration, see the [{ref_key} section](#{ref_key.lower().replace(' ', '-')})."
5050

5151
else:
5252
type = properties[property].get("type", "")
@@ -66,7 +66,7 @@ def get_documentation_data(title: str, data: list, properties: dict, defs: dict,
6666
header=ref.get("description"),
6767
level=level + 1,
6868
)
69-
description += f" For details of configuration, see the [{ref_key} section](#{ref_key.lower().replace(" ", "-")})."
69+
description += f" For details of configuration, see the [{ref_key} section](#{ref_key.lower().replace(' ', '-')})."
7070
else:
7171
values = ref.get("enum", [])
7272

@@ -101,9 +101,9 @@ def convert_field_to_string_if_dict(field):
101101
def convert_to_markdown(data: list):
102102
markdown = ""
103103
for item in reversed(data):
104-
markdown += f"{"#" * (item["level"] + 1)} {item["title"]}\n"
104+
markdown += f"{'#' * (item['level'] + 1)} {item['title']}\n"
105105
if item["header"]:
106-
markdown += f"{item["header"]}\n<br></br>\n\n"
106+
markdown += f"{item['header']}\n<br></br>\n\n"
107107

108108
if len(item["table"]) > 0:
109109
markdown += "| Attribute | Type | Description | Default | Values | Examples |\n"

0 commit comments

Comments
 (0)