-
Notifications
You must be signed in to change notification settings - Fork 881
docs: migrate existing docs to fern #5445
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
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a2a159c
Migrate existing docs to fern
Jont828 b7f31fb
Rename files from MDX to MD
Jont828 f682df9
Fix image names
Jont828 bf73863
test
nealvaidya ce510df
move copyright headers
nealvaidya 51036de
Remove stubs for older versioned docs
Jont828 db98ba4
Add fault tolerance section and docs to nav bar
Jont828 16dae4f
Merge branch 'main' into fern-migration-parallel
nealvaidya 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 |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ all: | |
|
|
||
| docs: | ||
| - 'docs/**' | ||
| - 'fern/**' | ||
| - '**/*.md' | ||
| - '**/*.rst' | ||
| - '**/*.txt' | ||
|
|
||
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
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,5 @@ | ||
| **/.preview | ||
| **/.definition | ||
|
|
||
| # Include logos | ||
| !*.svg |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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,47 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| instances: | ||
| - url: ai-dynamo.docs.buildwithfern.com | ||
|
|
||
| title: NVIDIA Dynamo Documentation | ||
|
|
||
| # Version configuration | ||
| versions: | ||
| - display-name: Next | ||
| path: ./versions/next.yml | ||
|
|
||
| # GitHub repository link in navbar | ||
| navbar-links: | ||
| - type: github | ||
| value: https://github.com/ai-dynamo/dynamo | ||
|
|
||
| # NVIDIA branding colors | ||
| colors: | ||
| accent-primary: | ||
| dark: "#76B900" | ||
| light: "#4A7300" | ||
| background: | ||
| dark: "#1A1A1A" | ||
| light: "#FFFFFF" | ||
|
|
||
| # Logo and favicon | ||
| logo: | ||
| href: / | ||
| light: ./assets/img/nvidia-logo.svg | ||
| dark: ./assets/img/nvidia-logo-dark.svg | ||
| height: 50 | ||
|
|
||
| favicon: ./assets/img/favicon.png | ||
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,4 @@ | ||
| { | ||
| "organization": "ai-dynamo", | ||
| "version": "3.29.1" | ||
| } |
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,189 @@ | ||
| --- | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| title: "Tool Calling with Dynamo" | ||
| --- | ||
|
|
||
| You can connect Dynamo to external tools and services using function calling (also known as tool calling). By providing a list of available functions, Dynamo can choose | ||
| to output function arguments for the relevant function(s) which you can execute to augment the prompt with relevant external information. | ||
|
|
||
| Tool calling (AKA function calling) is controlled using the `tool_choice` and `tools` request parameters. | ||
|
|
||
|
|
||
| ## Prerequisites | ||
|
|
||
| To enable this feature, you should set the following flag while launching the backend worker | ||
|
|
||
| - `--dyn-tool-call-parser` : select the parser from the available parsers list using the below command | ||
|
|
||
| ```bash | ||
| # <backend> can be vllm, sglang, trtllm, etc. based on your installation | ||
| python -m dynamo.<backend> --help" | ||
| ``` | ||
|
|
||
| <Note> | ||
| If no tool call parser is provided by the user, Dynamo will try to use default tool call parsing based on `<TOOLCALL>` and `<|python_tag|>` tool tags. | ||
| </Note> | ||
|
|
||
| <Tip> | ||
| If your model's default chat template doesn't support tool calling, but the model itself does, you can specify a custom chat template per worker | ||
| with `python -m dynamo.<backend> --custom-jinja-template </path/to/template.jinja>`. | ||
| </Tip> | ||
|
|
||
|
|
||
| Parser to Model Mapping | ||
|
|
||
| | Parser Name | Supported Models | | ||
| |-------------|-----------------------------------------------------------------------| | ||
| | hermes | Qwen/Qwen2.5-*, Qwen/QwQ-32B, NousResearch/Hermes-2-Pro-*, NousResearch/Hermes-2-Theta-*, NousResearch/Hermes-3-* | | ||
| | mistral | mistralai/Mistral-7B-Instruct-v0.3, Additional mistral function-calling models are compatible as well.| | ||
| | llama3_json | meta-llama/Llama-3.1-*, meta-llama/Llama-3.2-* | | ||
| | harmony | openai/gpt-oss-* | | ||
| | nemotron_deci | nvidia/nemotron-* | | ||
| | phi4 | Phi-4-* | | ||
| | deepseek_v3 | deepseek-ai/DeepSeek-V3, deepseek-ai/DeepSeek-R1, deepseek-ai/DeepSeek-R1-0528 | | ||
| | deepseek_v3_1 | deepseek-ai/DeepSeek-V3.1 | | ||
| | pythonic | meta-llama/Llama-4-* | | ||
| | jamba | ai21labs/AI21-Jamba-*-1.5, ai21labs/AI21-Jamba-*-1.6, ai21labs/AI21-Jamba-*-1.7, | | ||
|
|
||
|
|
||
| ## Examples | ||
|
|
||
| ### Launch Dynamo Frontend and Backend | ||
|
|
||
| ```bash | ||
| # launch backend worker | ||
| python -m dynamo.vllm --model openai/gpt-oss-20b --dyn-tool-call-parser harmony | ||
|
|
||
| # launch frontend worker | ||
| python -m dynamo.frontend | ||
| ``` | ||
|
|
||
| ### Tool Calling Request Examples | ||
|
|
||
| - Example 1 | ||
| ```python | ||
| from openai import OpenAI | ||
| import json | ||
|
|
||
| client = OpenAI(base_url="http://localhost:8081/v1", api_key="dummy") | ||
nealvaidya marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| def get_weather(location: str, unit: str): | ||
| return f"Getting the weather for {location} in {unit}..." | ||
| tool_functions = {"get_weather": get_weather} | ||
|
|
||
| tools = [{ | ||
| "type": "function", | ||
| "function": { | ||
| "name": "get_weather", | ||
| "description": "Get the current weather in a given location", | ||
| "parameters": { | ||
| "type": "object", | ||
| "properties": { | ||
| "location": {"type": "string", "description": "City and state, e.g., 'San Francisco, CA'"}, | ||
| "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]} | ||
| }, | ||
| "required": ["location", "unit"] | ||
| } | ||
| } | ||
| }] | ||
|
|
||
| response = client.chat.completions.create( | ||
| model="openai/gpt-oss-20b", | ||
| messages=[{"role": "user", "content": "What's the weather like in San Francisco in Celsius?"}], | ||
| tools=tools, | ||
| tool_choice="auto", | ||
| max_tokens=10000 | ||
| ) | ||
| print(f"{response}") | ||
| tool_call = response.choices[0].message.tool_calls[0].function | ||
| print(f"Function called: {tool_call.name}") | ||
| print(f"Arguments: {tool_call.arguments}") | ||
| print(f"Result: {tool_functions[tool_call.name](**json.loads(tool_call.arguments))}") | ||
| ``` | ||
|
|
||
| - Example 2 | ||
| ```python | ||
|
|
||
| # Use tools defined in example 1 | ||
|
|
||
| time_tool = { | ||
| "type": "function", | ||
| "function": { | ||
| "name": "get_current_time_nyc", | ||
| "description": "Get the current time in NYC.", | ||
| "parameters": {} | ||
| } | ||
| } | ||
|
|
||
|
|
||
| tools.append(time_tool) | ||
|
|
||
| messages = [ | ||
| {"role": "user", "content": "What's the current time in New York?"} | ||
| ] | ||
|
|
||
|
|
||
| response = client.chat.completions.create( | ||
| model="openai/gpt-oss-20b", #client.models.list().data[1].id, | ||
| messages=messages, | ||
| tools=tools, | ||
| tool_choice="auto", | ||
| max_tokens=100, | ||
| ) | ||
| print(f"{response}") | ||
| tool_call = response.choices[0].message.tool_calls[0].function | ||
| print(f"Function called: {tool_call.name}") | ||
| print(f"Arguments: {tool_call.arguments}") | ||
| ``` | ||
|
|
||
| - Example 3 | ||
|
|
||
|
|
||
| ```python | ||
|
|
||
| tools = [ | ||
| { | ||
| "type": "function", | ||
| "function": { | ||
| "name": "get_tourist_attractions", | ||
| "description": "Get a list of top tourist attractions for a given city.", | ||
| "parameters": { | ||
| "type": "object", | ||
| "properties": { | ||
| "city": { | ||
| "type": "string", | ||
| "description": "The name of the city to find attractions for.", | ||
| } | ||
| }, | ||
| "required": ["city"], | ||
| }, | ||
| }, | ||
| }, | ||
| ] | ||
|
|
||
| def get_messages(): | ||
| return [ | ||
| { | ||
| "role": "user", | ||
| "content": ( | ||
| "I'm planning a trip to Tokyo next week. what are some top tourist attractions in Tokyo? " | ||
| ), | ||
| }, | ||
| ] | ||
|
|
||
|
|
||
| messages = get_messages() | ||
|
|
||
| response = client.chat.completions.create( | ||
| model="openai/gpt-oss-20b", | ||
| messages=messages, | ||
| tools=tools, | ||
| tool_choice="auto", | ||
| max_tokens=100, | ||
| ) | ||
| print(f"{response}") | ||
| tool_call = response.choices[0].message.tool_calls[0].function | ||
| print(f"Function called: {tool_call.name}") | ||
| print(f"Arguments: {tool_call.arguments}") | ||
| ``` | ||
Oops, something went wrong.
Oops, something went wrong.
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.