Skip to content
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

[MINOR] Doc fix #305

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions adalflow/adalflow/core/prompt_builder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Class prompt builder for LightRAG system prompt."""
"""Class prompt builder for AdalFlow system prompt."""

from typing import Dict, Any, Optional, List, TypeVar
import logging
Expand All @@ -20,10 +20,10 @@
class Prompt(Component):
__doc__ = r"""Renders a text string(prompt) from a Jinja2 template string.

In default, we use the :ref:`DEFAULT_LIGHTRAG_SYSTEM_PROMPT<core-default_prompt_template>` as the template.
In default, we use the :ref:`DEFAULT_ADALFLOW_SYSTEM_PROMPT<core-default_prompt_template>` as the template.

Args:
template (str, optional): The Jinja2 template string. Defaults to DEFAULT_LIGHTRAG_SYSTEM_PROMPT.
template (str, optional): The Jinja2 template string. Defaults to DEFAULT_ADALFLOW_SYSTEM_PROMPT.
preset_prompt_kwargs (Optional[Dict], optional): The preset prompt kwargs to fill in the variables in the prompt. Defaults to {}.

Examples:
Expand Down
8 changes: 3 additions & 5 deletions docs/source/tutorials/tool_helper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ We will use :class:`components.output_parsers.outputs.JsonOutputParser` to strea

from adalflow.components.output_parsers import JsonOutputParser

func_parser = JsonOutputParser(data_class=Function)
instructions = func_parser.format_instructions(exclude=["thought", "args"])
func_parser = JsonOutputParser(data_class=Function, exclude_fields=["thought", "args"])
instructions = func_parser.format_instructions()
print(instructions)

The output is:
Expand Down Expand Up @@ -542,9 +542,7 @@ Now, let's prepare our generator with the above prompt, ``Function`` data class,
model_kwargs = {"model": "gpt-3.5-turbo"}
prompt_kwargs = {
"tools": tool_manager.yaml_definitions,
"output_format_str": func_parser.format_instructions(
exclude=["thought", "args"]
),
"output_format_str": func_parser.format_instructions(),
}
generator = Generator(
model_client=ModelClientType.OPENAI(),
Expand Down
Loading