معرفی شرکت ها


catprompt-0.1.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Combine prompts for chatgpt.
ویژگی مقدار
سیستم عامل -
نام فایل catprompt-0.1.1
نام catprompt
نسخه کتابخانه 0.1.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Juan Reyero <juan@juanreyero.com>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/catprompt/
مجوز Copyright (c) 2018 The Python Packaging Authority Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# catprompt `catprompt` is a command-line tool that simplifies the process of combining prompts in different files for programming with ChatGPT. It allows users to define a system prompt along with several functionality-specific prompts, which may include files with code, into a single prompt. The prompt files can be part of the project and later be used as the seed for documentation. Using `catprompt` when developing a large program with ChatGPT offers several advantages: 1. **System prompt consistency:** By having a central system prompt, you can ensure that essential information or context is consistently provided to ChatGPT across different parts of your project. This helps maintain uniformity and coherence in the responses generated by ChatGPT. 2. **Modularity:** `catprompt` allows you to divide prompts into separate files, enabling better organization of your project and keeping related prompts together. This makes it easier to maintain and update the code, as each functionality-specific prompt can be managed independently. 3. **Reusability:** With `catprompt`, you can reuse prompts or code snippets across different parts of the project, avoiding duplication and improving consistency. 4. **Collaboration:** Separating prompts into different files allows multiple team members to work on different aspects of the project simultaneously, without causing conflicts or requiring constant synchronization. 5. **Documentation:** The prompt files can serve as a foundation for your project's documentation, making it easier to keep the documentation up-to-date and in sync with the code. ## Usage 1. Install catprompt 2. Create your prompt files 3. Run catprompt with the main prompt file[s] as a command-line argument, along with any options: `catprompt [-r reverse_file] [-f flavor] path/to/prompt.txt [path/to/other-prompts.txt] [-c config_file]` 4. Use the processed content from the clipboard in ChatGPT. ### Options - `-c`, `--config`: Specify one or more configuration files containing private words and flavors (default: ~/.catprompt.ini and ./catprompt.ini). - `-r`, `--reverse`: Reverse the privatization from a given file and output the original content to stdout. - `-f`, `--flavor`: Use a flavor to prefix the output, extracted from the config file. ## Configuration Files (ini files) Configuration files (`.ini` format) can be used to store private words and flavors. By default, catprompt looks for configuration files at `~/.catprompt.ini` and `./catprompt.ini`. You can specify other locations using the `-c` or `--config` option. ### Private Words Private words are words that should be replaced with placeholders in the output. To define private words, create a section called `PrivateWords` and list them as a comma-separated string under the `list` key: ``` [PrivateWords] list = private_word_1, private_word_2, private_word_3 ``` ### Flavors Flavors are prefixes that can be added to the output. To define flavors, create a section called `Flavors` and list them as key-value pairs: ``` [Flavors] python = When programming in python follow the following rules, enclosed in ```:\n```\nAlways follow PEP-8 conventions.\n\nAlways prefer '' vs "" for strings. File names should be composed only with letters, numbers and dashes, not with underscores.\n\nThe first line of a python file is always # -*- coding: utf-8 -*-\n\nMake sure that the code formatting complies with PEP-8.\n\nUse pytest for tests.\n\nInput is from the command line whenever it makes sense. When the input is from the command line this is added at the end:\n\nif __name__ == '__main__':\n main()\n\nand the functionality is implemented in main. javascript = Your setup for javascript programming. ``` You can use the `-f` or `--flavor` option to specify the desired flavor when running `catprompt`. ## Installation `pip install catprompt` or 1. Visit the homepage at https://github.com/juanre/catprompt 2. Download the package as a ZIP file or clone the repository using git 3. Navigate to the downloaded folder in your command-line interface 4. Run `pip install .` to install the package Make sure you have `pip` installed on your system. If not, you can find instructions on how to install pip here: https://pip.pypa.io/en/stable/installation/ ## Prompt file format - Lines starting with `++` are ignored - Lines starting with `+=` should be followed by the name of a file to include. The file will be searched for in the directory of the original file, or in the working directory if not found there. The named file will be read, processed, and its content will replace the current line. - Lines starting with `+-` should be followed by the name of a file to include, and a description. The file will processed as above, and its content prefaced by a line saying "[description] follows delimited by \`\`\` and another line with just \`\`\` and followed by a line with \`\`\` - Lines starting with `+#` will cause the current line and all following lines in the file being processed to be ignored - Segments of a file can be tagged by adding a line that contains :prompt:tag at the beginning, and :/prompt:tag at the end. Include them by adding [tag] after the file name. ### Example Let's consider the following example with three files: **main-prompt.txt** ``` This is the main prompt. ++ This is a comment and will be ignored. += sub-prompt-1.txt +- code-snippet.py The snippet of code +- code-snippet.py [tag-1] The snippet of code limited to tag-1 This is the end of the main prompt. ``` **sub-prompt-1.txt** ``` This is the sub-prompt 1. +# Ignore the rest of this file This line will be ignored. This is useful to record the prompt that you used with this file, which you probably don't want when the file is included by another file ``` **code-snippet.py** ```python def example_function_1(): return "F1" # :prompt:tag-1 def example_function_2(): return "F2" # :/prompt:tag-1 def example_function_3(): return "F3" # :prompt:tag-1 def example_function_4(): return "F4" # :/prompt:tag-1 ``` When running `catprompt main-prompt.txt`, the processed content will be: ``` This is the main prompt. This is the sub-prompt 1. The snippet of code follows delimited by \`\`\` \`\`\` def example_function_1(): return "F1" # :prompt:tag-1 def example_function_2(): return "F2" # :/prompt:tag-1 def example_function_3(): return "F3" # :prompt:tag-1 def example_function_4(): return "F4" # :/prompt:tag-1 \`\`\` The snippet of code limited to tag-1 follows delimited by \`\`\` \`\`\` def example_function_2(): return "F2" def example_function_4(): return "F4" \`\`\` This is the end of the main prompt. ``` This processed content will be copied to your clipboard, ready for use with ChatGPT. ## Use cases - Combining a system prompt with functionality-specific prompts; - Including code snippets in your prompts; - Organizing prompt files as part of a project; - Using prompt files as the seed for documentation. ## Developing ``` mkdir ~/venv/catp && python -m venv ~/venv/catp source ~/venv/catp/bin/activate pip install --upgrade pip pip install -e . pip install ".[dev]" ``` ## Author ChatGPT-4, with prompting and editing help by Juan Reyero.


نیازمندی

مقدار نام
- clipboard
- tiktoken
>=0.18.1 jedi
>=2.13.9 pylint
>=7.0.0 pytest
>=0.32.0 yapf
- build
- twine


زبان مورد نیاز

مقدار نام
>=3.8 Python


نحوه نصب


نصب پکیج whl catprompt-0.1.1:

    pip install catprompt-0.1.1.whl


نصب پکیج tar.gz catprompt-0.1.1:

    pip install catprompt-0.1.1.tar.gz