feat: Add person bot (#182)

This commit introduces a new bot type called Person.
It behaves and speaks like a particular Person.

For this two app types: PersonApp and PersonOpenSourceApp
This commit is contained in:
Taranjeet Singh
2023-07-07 19:26:07 +05:30
committed by GitHub
parent 6a61fd38c3
commit 2a7d43551e
3 changed files with 64 additions and 7 deletions

View File

@@ -2,17 +2,18 @@ from embedchain.config.BaseConfig import BaseConfig
from string import Template
import re
DEFAULT_PROMPT_TEMPLATE = Template("""
DEFAULT_PROMPT = """
Use the following pieces of context to answer the query at the end.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
$context
Query: $query
Helpful Answer:
""")
"""
DEFAULT_PROMPT_TEMPLATE = Template(DEFAULT_PROMPT)
query_re = re.compile(r"\$\{*query\}*")
context_re = re.compile(r"\$\{*context\}*")