-
Notifications
You must be signed in to change notification settings - Fork 42
DOCS: LLM agent integration (getting started) #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ Developer guide | |
| :maxdepth: 3 | ||
|
|
||
| get_started | ||
| llm_agent_integration | ||
| add_benchmarks | ||
| add_category | ||
| running | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| ========================= | ||
| LLM-Assistant Integration | ||
| ========================= | ||
|
|
||
| When using LLM coding assistants (e.g. `Claude Code <https://code.claude.com>`_) for development or usage of this package, please see some tips and tricks here. | ||
|
|
||
| Docs on Context7 | ||
| ---------------- | ||
|
|
||
| ML-PEG documentation is indexed on `Context7 <https://context7.com>`_, which supplies up-to-date parsed documentation for the package as an MCP server. | ||
|
|
||
| **Library ID**: ``/ddmms/ml-peg`` | ||
|
|
||
| Getting started | ||
| +++++++++++++++ | ||
|
|
||
| Install the MCP server, e.g. for Claude Code: | ||
|
|
||
| .. code-block:: text | ||
|
|
||
| claude mcp add context7 -- npx -y @upstash/context7-mcp | ||
|
|
||
| See `installation instructions <https://github.com/upstash/context7#installation>`_ for other tools as well. | ||
|
|
||
| Afterwards can ask the agent to load the library, or you can add this to your agent's standard instructions, e.g. `CLAUDE.md` file. | ||
|
|
||
| .. code-block:: text | ||
|
|
||
| @context7 load library /ddmms/ml-peg | ||
|
|
||
| Claude Code will use the ``/ddmms/ml-peg`` library ID to fetch relevant documentation and code examples. | ||
|
|
||
| Common Use Cases | ||
| ++++++++++++++++ | ||
|
|
||
| Asking to query the documentation directly: | ||
|
|
||
| .. code-block:: text | ||
|
|
||
| @context7 How do I add a new benchmark calculation script? | ||
|
|
||
| Asking about further specifics: | ||
|
|
||
| .. code-block:: text | ||
|
|
||
| How do I structure a calculation script using pytest parametrization? use context7 | ||
|
|
||
| Related Documentation | ||
| --------------------- | ||
|
|
||
| For related libraries on Context7: | ||
|
|
||
| - **mlipx** (``/basf/mlipx``): Base calculator abstraction library used by ML-PEG | ||
| - **janus-core** (``/stfc/janus-core``: another back-end for ML-PEG | ||
|
|
||
|
|
||
| API Keys and Rate Limits | ||
| ------------------------- | ||
|
|
||
| Context7 provides free access with rate limits at the time of writing. | ||
| For higher rate limits and being able to submit new documentation sources to index: | ||
|
|
||
| 1. Visit https://context7.com | ||
| 2. Create an account | ||
| 3. Generate an API key from the dashboard | ||
| 4. Configure your AI assistant with the API key | ||
|
|
||
| .. note:: | ||
|
|
||
| ML-PEG is a public repository and does not require an API key for basic usage through Context7. | ||
|
|
||
| Keeping Documentation Updated | ||
| ----------------------------- | ||
|
|
||
| The ML-PEG library on Context7 is automatically updated when changes are pushed to the main branch. Documentation typically updates within 24 hours of changes being merged. If you notice outdated information you can click to refresh on the site, `you need to log in to do this`. | ||
|
|
||
| .. tip:: | ||
|
|
||
| When contributing new benchmarks or features, ensure your docstrings and documentation updates are merged to main before using Context7 to help others understand your additions. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.