generated from cheshire-cat-ai/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.py
25 lines (20 loc) · 845 Bytes
/
settings.py
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
from pydantic import BaseModel, Field
from cat.mad_hatter.decorators import plugin
class MySettings(BaseModel):
hyde_prompt: str = Field(
title="HyDe prompt",
default="""You will be given a sentence.
If the sentence is a question, convert it to a plausible answer. If the sentence does not contain a question,
just repeat the sentence as is without adding anything to it.
Examples:
- what furniture there is in my room? --> In my room there is a bed, a wardrobe and a desk with my computer
- where did you go today --> today I was at school
- I like ice cream --> I like ice cream
- how old is Jack --> Jack is 20 years old
Sentence:
- {input} -->""",
extra={"type": "TextArea"}
)
@plugin
def settings_schema():
return MySettings.schema()