Improving chat functionality significantly throughout the application.
This commit is contained in:
@@ -73,26 +73,24 @@ class Config(object):
|
||||
OAI_TE3S_MAX_CHUNK_SIZE = 3000
|
||||
|
||||
# LLM TEMPLATES
|
||||
GPT4_SUMMARY_TEMPLATE = """Write a concise summary of the text in the same language as the provided text.
|
||||
Text is delimited between triple backquotes.
|
||||
GPT4_SUMMARY_TEMPLATE = """Write a concise summary of the text in {language}. The text is delimited between triple backquotes.
|
||||
```{text}```"""
|
||||
GPT3_5_SUMMARY_TEMPLATE = """Write a concise summary of the text in the same language as the provided text.
|
||||
Text is delimited between triple backquotes.
|
||||
GPT3_5_SUMMARY_TEMPLATE = """Write a concise summary of the text in {language}. The text is delimited between triple backquotes.
|
||||
```{text}```"""
|
||||
GPT4_RAG_TEMPLATE = """Answer the question based on the following context, both delimited between triple backquotes
|
||||
in the same language as question.
|
||||
If the question cannot be answered using the text, say "I don't know" in the same language as the question.
|
||||
GPT4_RAG_TEMPLATE = """Answer the question based on the following context, delimited between triple backquotes.
|
||||
Use the following {language} in your communication, and cite the sources used.
|
||||
If the question cannot be answered using the given context, say "I have insufficient information to answer this question."
|
||||
Context:
|
||||
```{context}```
|
||||
Question:
|
||||
```{question}```"""
|
||||
GPT3_5_RAG_TEMPLATE = """Answer the question based on the following context, both delimited between triple backquotes
|
||||
in the same language as question.
|
||||
If the question cannot be answered using the text, say "I don't know" in the same language as the question.
|
||||
Context:
|
||||
```{context}```
|
||||
Question:
|
||||
```{question}```"""
|
||||
{question}"""
|
||||
GPT3_5_RAG_TEMPLATE = """Answer the question based on the following context, delimited between triple backquotes.
|
||||
Use the following {language} in your communication.
|
||||
If the question cannot be answered using the given context, say "I have insufficient information to answer this question."
|
||||
Context:
|
||||
```{context}```
|
||||
Question:
|
||||
{question}"""
|
||||
|
||||
# SocketIO settings
|
||||
# SOCKETIO_ASYNC_MODE = 'threading'
|
||||
@@ -105,6 +103,14 @@ class Config(object):
|
||||
PERMANENT_SESSION_LIFETIME = timedelta(minutes=60)
|
||||
SESSION_REFRESH_EACH_REQUEST = True
|
||||
|
||||
# Interaction algorithms
|
||||
INTERACTION_ALGORITHMS = {
|
||||
"RAG_TENANT": {"name": "RAG_TENANT", "description": "Algorithm using only information provided by the tenant"},
|
||||
"RAG_WIKIPEDIA": {"name": "RAG_WIKIPEDIA", "description": "Algorithm using information provided by Wikipedia"},
|
||||
"RAG_GOOGLE": {"name": "RAG_GOOGLE", "description": "Algorithm using information provided by Google"},
|
||||
"LLM": {"name": "LLM", "description": "Algorithm using information integrated in the used LLM"}
|
||||
}
|
||||
|
||||
|
||||
class DevConfig(Config):
|
||||
DEVELOPMENT = True
|
||||
|
||||
Reference in New Issue
Block a user