moved custom instructions

This commit is contained in:
Elias Bachaalany
2024-03-08 10:35:38 -08:00
parent d3fa35bbc9
commit a701d8369f
3 changed files with 1120 additions and 1120 deletions

View File

@@ -135,7 +135,7 @@ def parse_gpturl(url: str) -> Union[GptIdentifier, None]:
def get_prompts_path() -> str: def get_prompts_path() -> str:
"""Return the path to the prompts directory.""" """Return the path to the prompts directory."""
return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'prompts', 'gpts')) return os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'CustomInstructions', 'ChatGPT'))
def enum_gpts() -> Generator[Tuple[bool, Union[GptMarkdownFile, str]], None, None]: def enum_gpts() -> Generator[Tuple[bool, Union[GptMarkdownFile, str]], None, None]:
"""Enumerate all the GPT files in the prompts directory, parse them and return the parsed GPT object.""" """Enumerate all the GPT files in the prompts directory, parse them and return the parsed GPT object."""

View File

@@ -75,7 +75,7 @@ def parse_gpt_file(filename) -> Tuple[bool, str]:
def rebuild_toc(toc_out: str = '') -> Tuple[bool, str]: def rebuild_toc(toc_out: str = '') -> Tuple[bool, str]:
""" """
Rebuilds the table of contents (TOC.md) file by reading all the GPT files in the prompts/gpts directory. Rebuilds the table of contents (TOC.md) file by reading all the GPT files in the CustomInstructions/ChatGPT directory.
""" """
if not toc_out: if not toc_out:
print(f"Rebuilding Table of Contents (TOC.md) in place") print(f"Rebuilding Table of Contents (TOC.md) in place")
@@ -137,7 +137,7 @@ def rebuild_toc(toc_out: str = '') -> Tuple[bool, str]:
gpts.sort(key=gpts_sorter) gpts.sort(key=gpts_sorter)
for id, gpt in gpts: for id, gpt in gpts:
file_link = f"./prompts/gpts/{quote(os.path.basename(gpt.filename))}" file_link = f"./CustomInstructions/ChatGPT/{quote(os.path.basename(gpt.filename))}"
version = f" {gpt.get('version')}" if gpt.get('version') else '' version = f" {gpt.get('version')}" if gpt.get('version') else ''
out.append(f" - [{gpt.get('title')}{version} (id: {id.id})]({file_link})\n") out.append(f" - [{gpt.get('title')}{version} (id: {id.id})]({file_link})\n")

2234
TOC.md
View File

File diff suppressed because it is too large Load Diff