Skip to content

Commit

Permalink
refactor: renamed function to remove 'private' underscore prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Sep 22, 2024
1 parent 8728012 commit a7a5cf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions gptme/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .config import get_config
from .message import Message
from .tools import init_tools, loaded_tools
from .util import _document_prompt_function
from .util import document_prompt_function

PromptType = Literal["full", "short"]

Expand Down Expand Up @@ -202,7 +202,7 @@ def prompt_tools(examples: bool = True) -> Generator[Message, None, None]:
yield Message("system", prompt.strip() + "\n\n")


_document_prompt_function(interactive=True)(prompt_gptme)
_document_prompt_function()(prompt_user)
_document_prompt_function()(prompt_project)
_document_prompt_function()(prompt_tools)
document_prompt_function(interactive=True)(prompt_gptme)
document_prompt_function()(prompt_user)
document_prompt_function()(prompt_project)
document_prompt_function()(prompt_tools)
2 changes: 1 addition & 1 deletion gptme/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _is_sphinx_build() -> bool:
return is_sphinx


def _document_prompt_function(*args, **kwargs):
def document_prompt_function(*args, **kwargs):
"""Decorator for adding example output of prompts to docstrings in rst format"""

def decorator(func): # pragma: no cover
Expand Down

0 comments on commit a7a5cf6

Please sign in to comment.