vjvasiljev / ChatGPT-Prompts-app

A collection of functional prompts that can be used in everyday workflows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChatGPT-Prompts-app

A collection of functional prompts that can be used in everyday workflows

Generating: GPT Programming To design a linguistic programming framework in Python specifically for ChatGPT prompt programming, we will need to devise a set of functional keywords and design an API that facilitates interactions with GPT models. This new language/module will be called "ChatGPTlang."

Functional Keywords:

  1. Brainstorm(Idea): For idea generation.
  2. RolePlay(Role): For role-based interactions.
  3. Explain(Topic): For providing explanations on specific topics.
  4. Translate(Language): For translating between languages.
  5. Summarize(Text): For summarizing a given text.
  6. Compare(item1, item2): For comparing two entities.
  7. Instruct(Task): For providing instructions to perform a task.
  8. Advise(Situation): For offering guidance in various situations.
  9. Story(Setting, Character, Action): For creating stories.

Implementation Process:

  1. Create a Python module named "ChatGPTlang".
  2. Implement an API wrapper for the OpenAI library to handle the communication with the GPT model.
  3. Define classes or functions for each functional keyword that take the required parameters as inputs and interact with the API wrapper.
  4. Design a parsing mechanism to map natural language prompts to the functional keywords and their syntax.
  5. Test the framework with various use cases, and iterate the design as necessary.

Framework Structure:

ChatGPTlang/
│
├── chatgpt_lang.py
├── api_wrapper.py
├── brainstorm.py
├── roleplay.py
└── [more_specialized_classes_or_functions.py]

Example code:

from ChatGPTlang import Brainstorm, RolePlay, Explain

# Using Brainstorm
ideas = Brainstorm("topics for a tech blog", brainstorm())
print(ideas)

# Using RolePlay
response = RolePlay("software architect", "How do I design a microservices architecture?")
print(response())

# Using Explain
explanation = Explain("Python decorators")
print(explanation())

Ideal Workflow:

  1. Users import the functional keywords, similar to traditional Python modules, from the ChatGPTlang library.
  2. After importing, users instantiate the desired functions or classes with necessary parameters, adhering to the designed syntax.
  3. The ChatGPTlang framework handles translating the user's input into tailored prompts for ChatGPT, sends the request to the GPT model, and parses the response.
  4. The user receives the final result and leverages the output as needed.

With this linguistic programming framework for ChatGPT, prompt engineers can interact more intuitively and efficiently with GPT models. The framework will also make it easier to share and enforce best practices discovered within the community.

Here are 20 functional keywords for a variety of use cases:

  1. Brainstorm(Idea): For idea generation.
  2. RolePlay(Role): For role-based interactions.
  3. Explain(Topic): For providing explanations on specific topics.
  4. Translate(Language): For translating between languages.
  5. Summarize(Text): For summarizing a given text.
  6. Compare(Item1, Item2): For comparing two entities.
  7. Instruct(Task): For providing instructions to perform a task.
  8. Advise(Situation): For offering guidance in various situations.
  9. Story(Setting, Character, Action): For creating stories.
  10. Recommend(Category, Preferences): For generating personalized recommendations.
  11. Evaluate(Subject, Criteria): For assessing subjects based on specific criteria.
  12. Solve(Problem, Method): For solving problems using different methods.
  13. Analyze(Data, Goal): For analyzing data to achieve specific goals.
  14. Plan(Event, Requirements): For creating plans for events or projects.
  15. Simulate(Scenario, Variables): For simulating different scenarios and outcomes.
  16. Calculate(Expression, Variables): For performing mathematical calculations.
  17. Optimize(Objective, Constraints): For finding optimal solutions within constraints.
  18. Synthesize(Sources, Topic): For combining information from multiple sources.
  19. Predict(Trend, Factors): For making predictions based on trends and factors.
  20. Debate(Argument1, Argument2): For presenting and comparing opposing arguments.

These functional keywords can be integrated into the ChatGPTlang framework to facilitate a wide range of tasks and interactions with GPT models. Users can access these keywords as needed to streamline their everyday workflows and generate relevant outputs efficiently.

About

A collection of functional prompts that can be used in everyday workflows

License:MIT License


Languages

Language:Python 100.0%