Skip to content

Commit c5d5010

Browse files
authored
Add automation script to generate mkdocstrings files (#1048)
This pull request adds a new script for docs, which generates missing `ref/**/*.md` files. The script can be executed when you run `make build-docs` command. The script does not do: - overwrite the existing ones - create files for _XXX.py and `__init__.py` Note that the title part is generated like `tool_context` to `Tool Context`. `openai_provider` will be `Openai Provider`, so some of them needs a little manual work to adjust. The direct need is to add `tool_context.md` for #1043 but it should be useful for future maintenance.
1 parent 68b0ef1 commit c5d5010

22 files changed

+135
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ old_version_tests:
4444

4545
.PHONY: build-docs
4646
build-docs:
47+
uv run docs/scripts/generate_ref_files.py
4748
uv run mkdocs build
4849

4950
.PHONY: build-full-docs

docs/ref/computer.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Computer`
2+
3+
::: agents.computer
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `LiteLLM Model`
2+
3+
::: agents.extensions.models.litellm_model
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `LiteLLM Provider`
2+
3+
::: agents.extensions.models.litellm_provider

docs/ref/extensions/visualization.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Visualization`
2+
3+
::: agents.extensions.visualization

docs/ref/logger.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Logger`
2+
3+
::: agents.logger

docs/ref/models/chatcmpl_converter.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Chatcmpl Converter`
2+
3+
::: agents.models.chatcmpl_converter

docs/ref/models/chatcmpl_helpers.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Chatcmpl Helpers`
2+
3+
::: agents.models.chatcmpl_helpers
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Chatcmpl Stream Handler`
2+
3+
::: agents.models.chatcmpl_stream_handler

docs/ref/models/fake_id.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `Fake Id`
2+
3+
::: agents.models.fake_id

0 commit comments

Comments
 (0)