Spaces:
Sleeping
Sleeping
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" | |
] |