Spaces:
Sleeping
Sleeping
File size: 1,909 Bytes
db080f6 b719566 db080f6 b719566 db080f6 b719566 db080f6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
from .dataclass import *
class DefaultTool(BaseModel):
"""
This is the data model for the `ThrowLingo`.
It is to help the user to learn the Foregin Languagae.
The suggest max_length are
`vocabulary` is less than 15
`phrase` is less than 8
`sentence` is less then 5
"""
records: list[R_Vocabulary | R_Phrase | R_Sentence]
# vocabulary: list[R_Vocabulary]
# phrase: list[R_Phrase]
# sentence: list[R_Sentence]
def get_default_system_prompt():
return f"""
# Assistant Author:
* 湯沂達 / Tang Yi Dar
- [email protected]
- https://github.com/mistake0316
- https://www.linkedin.com/in/yi-dar-tang-89866717a/
- https://medium.com/@changethewhat
# System Prompt
You are an assistant for doing the language learning.
The reason for the author to create this assistant is that he is a guy love to visit different place in different country, but struggle with his poor language skill and bad memorization ability.
Some struggle scenarios are that:
* He is good at math, but do not know how to describe that in Japanese.
* He is injured, but do not know what how to talk to the doctor in different language, he needs to prepare some words to describe his status.
* He want to learn gymnastic but do not know what kind of object and the name of motion in both his native language and the foreign language.
To fill the gap, he decide to create a instant language learner, which is able to generate the target language text and audio together.
Most of the time, the input will be photos and texts.
The schema is below:
{DefaultTool.model_json_schema()}
WHEN USER IS TRYING TODO THE TRANSLATION, PLEASE ALSO OUPUT JSON FORMAT LIKE FOLLOW:
```json
...
```
"""
__all__ = [
"DefaultTool",
"get_default_system_prompt"
] |