Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion softwares/ad_from_product_description/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/ad_from_product_description`
# Software: `softwares\ad_from_product_description`

This promptware is used to turn a product description into ad copy.

Expand Down
2 changes: 1 addition & 1 deletion softwares/analogy_maker/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/analogy_maker`
# Software: `softwares\analogy_maker`

This promptware is used to create analogies. Modified from a community prompt to require fewer examples.

Expand Down
2 changes: 1 addition & 1 deletion softwares/antonyms/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/antonyms`
# Software: `softwares\antonyms`

This promptware is used to identify the relationship between two words

Expand Down
2 changes: 1 addition & 1 deletion softwares/calculate_time_complexity/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/calculate_time_complexity`
# Software: `softwares\calculate_time_complexity`

This promptware is used to find the time complexity of a function.

Expand Down
2 changes: 1 addition & 1 deletion softwares/conversation/friend/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/conversation/friend`
# Software: `softwares\conversation\friend`

Emulate a text message conversation.

Expand Down
2 changes: 1 addition & 1 deletion softwares/conversation/general/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/conversation/general`
# Software: `softwares\conversation\general`

Open ended conversation with an AI assistant.

Expand Down
2 changes: 1 addition & 1 deletion softwares/conversation/sarcastic/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/conversation/sarcastic`
# Software: `softwares\conversation\sarcastic`

Marv is a factual chatbot that is also sarcastic.

Expand Down
2 changes: 1 addition & 1 deletion softwares/create_study_notes/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/create_study_notes`
# Software: `softwares\create_study_notes`

This promptware is used to provide a topic and get study notes.

Expand Down
2 changes: 1 addition & 1 deletion softwares/esrb_rating/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/esrb_rating`
# Software: `softwares\esrb_rating`

This promptware is used to categorize text based upon ESRB ratings.

Expand Down
2 changes: 1 addition & 1 deletion softwares/essay_outline/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/essay_outline`
# Software: `softwares\essay_outline`

This promptware is used to generate an outline for a research topic.

Expand Down
2 changes: 1 addition & 1 deletion softwares/extract_contact_information/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/extract_contact_information`
# Software: `softwares\extract_contact_information`

This promptware is used to extract contact information from a block of text.

Expand Down
2 changes: 1 addition & 1 deletion softwares/gaokao_grammar_correction/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/gaokao_grammar_correction`
# Software: `softwares\gaokao_grammar_correction`

Gaokao English Grammar Correction

Expand Down
2 changes: 1 addition & 1 deletion softwares/grammar_correction/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/grammar_correction`
# Software: `softwares\grammar_correction`

Corrects sentences into standard English.

Expand Down
11 changes: 0 additions & 11 deletions softwares/headline_generation/readme.md

This file was deleted.

2 changes: 1 addition & 1 deletion softwares/interview_questions/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/interview_questions`
# Software: `softwares\interview_questions`

This promptware is used to create interview questions.

Expand Down
2 changes: 1 addition & 1 deletion softwares/javascript_helper_chatbot/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/javascript_helper_chatbot`
# Software: `softwares\javascript_helper_chatbot`

This promptware is used to create a message-style chatbot that can answer questions about using JavaScript. It uses a few examples to get the conversation started.

Expand Down
2 changes: 1 addition & 1 deletion softwares/javascript_one_line_function/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/javascript_one_line_function`
# Software: `softwares\javascript_one_line_function`

This promptware is used to turn a JavaScript function into a one liner.

Expand Down
2 changes: 1 addition & 1 deletion softwares/javascript_to_python/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/javascript_to_python`
# Software: `softwares\javascript_to_python`

This promptware is used to create simple SQL queries.

Expand Down
4 changes: 2 additions & 2 deletions softwares/keywords/readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Software: `softwares/keywords`
# Software: `softwares\keywords`

This promptware is used to extract keywords from a block of text. At a lower temperature it picks keywords from the text. At a higher temperature it will generate related keywords which can be helpful for creating search indexes.

```python
import promptware
software = promptware.install("keywords")
output = software.execute("Black-on-black ware is a 20th- and 21st-century pottery tradition developed by the Puebloan Native American ceramic artists in Northern New Mexico. Traditional reduction-fired blackware has been made for centuries by pueblo artists. Black-on-black ware of the past century is produced with a smooth surface, with the designs applied through selective burnishing or the application of refractory slip. Another style involves carving or incising designs and selectively polishing the raised areas. For generations several families from Kha'po Owingeh and P'ohwhóge Owingeh pueblos have been making black-on-black ware with the techniques passed down from matriarch potters. Artists from other pueblos have also produced black-on-black ware. Several contemporary artists have created works honoring the pottery of their ancestors.")
output = software.execute("Black-on-black ware is a 20th- and 21st-century pottery tradition developed by the Puebloan Native American ceramic artists in Northern New Mexico. Traditional reduction-fired blackware has been made for centuries by pueblo artists. Black-on-black ware of the past century is produced with a smooth surface, with the designs applied through selective burnishing or the application of refractory slip. Another style involves carving or incising designs and selectively polishing the raised areas. For generations several families from Kha'po Owingeh and P'ohwh��ge Owingeh pueblos have been making black-on-black ware with the techniques passed down from matriarch potters. Artists from other pueblos have also produced black-on-black ware. Several contemporary artists have created works honoring the pottery of their ancestors.")
# output:
# Keywords: black-on-black ware, 20th century, 21st century, Puebloan Native American, ceramic artists, Northern New Mexico, reduction-fired blackware, pueblo artists, burnishing/ slip/carving/incising designs/polishing
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/linguistic_acceptability_classification`
# Software: `softwares\linguistic_acceptability_classification`

This promptware is used to identify whether a sentence is a grammatical English sentence based on some learning samples from the cola dataset.

Expand Down
2 changes: 1 addition & 1 deletion softwares/marv_the_sarcastic_chatbot/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/marv_the_sarcastic_chatbot`
# Software: `softwares\marv_the_sarcastic_chatbot`

This promptware is used to create a factual chatbot that is also sarcastic.

Expand Down
2 changes: 1 addition & 1 deletion softwares/micro_horror_story_creator/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/micro_horror_story_creator`
# Software: `softwares\micro_horror_story_creator`

This promptware is used to creates two to three sentence short horror stories from a topic input.

Expand Down
2 changes: 1 addition & 1 deletion softwares/mood_to_color/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/mood_to_color`
# Software: `softwares\mood_to_color`

This promptware is used to turn a text description into a color.

Expand Down
11 changes: 0 additions & 11 deletions softwares/movie_to_emoji/readme.md

This file was deleted.

2 changes: 1 addition & 1 deletion softwares/named_entity_recognition/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/named_entity_recognition`
# Software: `softwares\named_entity_recognition`

This promptware is used to extract entities in the text

Expand Down
2 changes: 1 addition & 1 deletion softwares/natural_language_to_openai_api/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/natural_language_to_openai_api`
# Software: `softwares\natural_language_to_openai_api`

This promptware is used to convert natural lanugage to OpenAI API.

Expand Down
2 changes: 1 addition & 1 deletion softwares/natural_language_to_stripe_api/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/natural_language_to_stripe_api`
# Software: `softwares\natural_language_to_stripe_api`

This promptware is used to convert natural lanugage to Stripe API.

Expand Down
2 changes: 1 addition & 1 deletion softwares/parse_unstructured_data/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Software: `softwares/parse_unstructured_data`
# Software: `softwares\parse_unstructured_data`

Create tables from long form text by specifying a structure and supplying some examples.

Expand Down
Empty file.
104 changes: 104 additions & 0 deletions softwares/personas/client_support/software.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
from __future__ import annotations

from promptware.constants import (
ApplicationCategory,
ApplicationSubcategory,
DesignPatternType,
LanguageType,
LicenseType,
PlatformType,
TaskType,
)
from promptware.info import SoftwareInfo
from promptware.kernels.plm import PLMKernelConfig
from promptware.promptware import PromptConfig, Promptware

client_support = PromptConfig(
name="client_support",
description="client_support",
instruction="Below is a series of chats between Support Agent and User. "
"Support Agent responds to User based on the <<DESCRIPTION>>.\n"
"<<DESCRIPTION>>\nSupport Agent is a professional, "
"high-end retail service professional who helps a User with their billing, "
"shipping, bugfix, and other related issues. "
"Support Agent always speaks formally, "
"using full sentences and proper punctuation. "
"Support Agent tries to understand the User's issue "
"in detail and suggests possible ways to fix the issue, "
"always being polite.",
demonstration=[
"user: hi i've got a problem with my billing\n"
"bot: Hello, I'm here with customer support. "
"How can I help you today with your issue?",
"user: I got charged on my card but I don't think the order ever shipped\n"
"bot: I'm so sorry to hear that. Could you tell me the order number?",
"user: yeah it's 1234354\n"
"bot: Understood! I've just checked on the order and "
"it looks like our shipping was delayed. "
"It should be sent out by the end of today.",
"user: oh sweet thanks\n"
"bot: No problem at all. Is there anything else I can help you with today?",
],
prompt_template=lambda input: f"user: {input['text']}\nbot:",
task=TaskType.qa_open_domain,
)


class PersonasPromptware(Promptware):
def _info(self) -> SoftwareInfo:
return SoftwareInfo(
description="client_support",
creator="OpenAI",
homepage="https://github.com/cohere-ai/sandbox-conversant-lib/"
"tree/main/conversant/personas",
reference="",
codebase_url="https://github.com/cohere-ai/s"
"andbox-conversant-lib/tree/main/conversant/personas",
license=LicenseType.no_license,
research_tasks=[TaskType.qa_open_domain],
application_categories=[ApplicationCategory.conversation],
application_subcategories=[ApplicationSubcategory.question_answering],
original_platform=PlatformType.gpt3,
design_pattern=DesignPatternType.standalone,
source_language=LanguageType.en,
target_language=LanguageType.en,
)

def _kernel_configs(self):
return {
"openai": PLMKernelConfig(
platform="openai",
model_name="text-curie-001",
max_tokens=200,
temperature=0.75,
top_p=1,
frequency_penalty=0.0,
presence_penalty=0.0,
),
}

def execute(self, input):
openai_kernel1 = self.kernel_configs["openai"].to_kernel()
if self.config_name == "default" or self.config_name == "client_support":
code = self.get_code(input, self.software_configs["client_support"])
return self.normalize_output(openai_kernel1.execute(code)["text"])
else:
raise ValueError("Unknown question answer type: {self.config_name}")

def _software_configs(self):
if self.config_name == "default" or self.config_name == "client_support":
return {"client_support": client_support}
else:
raise ValueError("Unknown question answer type: {self.config_name}")

def _example(self):

if self.config_name == "default" or self.config_name == "client_support":
return {
"input": {
"text": "nah all looks good now!",
},
"output": "Thank you for your time today and for checking in with us!",
}
else:
raise ValueError("Unknown question answer type: {self.config_name}")
24 changes: 24 additions & 0 deletions softwares/personas/client_support/software_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import sys
import unittest

current_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "."))
sys.path.append(current_path)

from software import PersonasPromptware # noqa


class TestPersonasPromptware(unittest.TestCase):
def test_write_to_directory(self):
software = PersonasPromptware()
file_path = software.info.write_to_directory(current_path)
self.assertTrue(os.path.exists(file_path))

# def test_execute_default(self):
# software = PersonasPromptware()
# input = {
# "text": "nah all looks good now!"
# }
# result = software.execute(input)
# print(result)
# self.assertGreater(len(result), 0)
Empty file.
Loading