Commit
·
030e659
1
Parent(s):
831938b
Update README.md
Browse files
README.md
CHANGED
@@ -19,7 +19,47 @@ Try in colab (you might need the pro version):
|
|
19 |
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
20 |
</a>
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
```json
|
24 |
[
|
25 |
{
|
|
|
19 |
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
20 |
</a>
|
21 |
|
22 |
+
## Installation
|
23 |
+
|
24 |
+
```bash
|
25 |
+
pip install llm-toys
|
26 |
+
```
|
27 |
+
|
28 |
+
```python
|
29 |
+
from llm_toys.tasks import GeneralTaskAssitant
|
30 |
+
from llm_toys.config import TaskType
|
31 |
+
|
32 |
+
gta = GeneralTaskAssitant()
|
33 |
+
gta.complete(TaskType.PARAPHRASE_TONE, "Hey, can yuo hepl me cancel my last order?")
|
34 |
+
# "Could you assist me in canceling my previous order?"
|
35 |
+
|
36 |
+
gta.complete(TaskType.PARAPHRASE_TONE, "Hey, can yuo hepl me cancel my last order?", tone="casual")
|
37 |
+
# "Hey, can you help me cancel my last order?"
|
38 |
+
|
39 |
+
gta.complete(TaskType.PARAPHRASE_TONE, "Hey, can yuo hepl me cancel my last order?", tone="professional")
|
40 |
+
# "I would appreciate if you could assist me in canceling my previous order."
|
41 |
+
|
42 |
+
gta.complete(TaskType.PARAPHRASE_TONE, "Hey, can yuo hepl me cancel my last order?", tone="witty")
|
43 |
+
# "Oops! Looks like I got a little carried away with my shopping spree. Can you help me cancel my last order?"
|
44 |
+
|
45 |
+
chat = """
|
46 |
+
#Person1#: I'm so excited for the premiere of the latest Studio Ghibli movie!
|
47 |
+
#Person2#: What's got you so hyped?
|
48 |
+
#Person1#: Studio Ghibli movies are pure magic! The animation, storytelling, everything is incredible.
|
49 |
+
#Person2#: Which movie is it?
|
50 |
+
#Person1#: It's called "Whisper of the Wind." It's about a girl on a magical journey to save her village.
|
51 |
+
#Person2#: Sounds amazing! I'm in for the premiere.
|
52 |
+
#Person1#: Great! We're in for a visual masterpiece and a heartfelt story.
|
53 |
+
#Person2#: Can't wait to be transported to their world.
|
54 |
+
#Person1#: It'll be an unforgettable experience, for sure!
|
55 |
+
""".strip()
|
56 |
+
gta.complete(TaskType.DIALOGUE_SUMMARY_TOPIC, chat)
|
57 |
+
# {"summary": "#Person1# tells #Person2# about the upcoming Studio Ghibli movie.
|
58 |
+
# #Person1# thinks it's magical and #Person2#'s excited to watch it.",
|
59 |
+
# "topic": "Movie premiere"}
|
60 |
+
```
|
61 |
+
|
62 |
+
## Sample training data
|
63 |
```json
|
64 |
[
|
65 |
{
|