Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ExpressAI/Promptware

Open more actions menu

Repository files navigation

Software 3.0 - Promptware

Install

For common users

pip install promptware

For developers

git clone https://github.com/ExpressAI/Promptware.git
cd Promptware

# Install the required dependencies and dev dependencies
pip install -e .

Quick Example

export OS_API_KEY=YOUR_OPENAI_KEY
from promptware import install
software = install("sentiment_classifier")
label = software.execute({"text": "I love this movie"})

or

import promptware as pop
software = pop.install("sentiment_classifier")
label = software.execute({"text": "I love this movie"})

or install a software locally

from promptware import install
software = install("./softwares/sentiment_classifier")
label = software.execute({"text": "I love this movie"})

it also supports subconfig:

from promptware import install
software = install("./softwares/machine_translation", "enzh")
software = install("./softwares/machine_translation", "zhen")

See more in this example

Add More Softwares

Here is one example, where you need to create two files:

  • sentiment_classifier: declare different configs of the software
  • sentiment_classifier_test: a test file for your defined software

you can run the test file with following script:

python -m unittest softwares.sentiment_classifier.sentiment_classifier_test

Schema of Promptware

@dataclass
class Promptware:
    # Name
    name: str
    # Describe what the promptware is designed for
    description: str
    # Instruction text of promptware
    instruction: str | Callable[[Any], str]
    # Demonstration of promptware
    demonstration: Optional[list[str]]
    # Prompt template defines how a user's input will be formatted
    prompt_template: Callable[[Any], str]
    # The most appropriate tasks that the promptware could be applied to
    task: TaskType

About

Software 3.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.