Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -54,7 +54,7 @@ os.environ['OPENAI_API_KEY'] = os.environ['OPENAI_API_KEY']
|
|
| 54 |
|
| 55 |
@cl.author_rename
|
| 56 |
def rename(orig_author: str):
|
| 57 |
-
rename_dict = {"DatapccSkillStream": "
|
| 58 |
return rename_dict.get(orig_author, orig_author)
|
| 59 |
|
| 60 |
@cl.action_callback("download")
|
|
@@ -105,11 +105,12 @@ async def start():
|
|
| 105 |
welcomeUser = app_user.identifier
|
| 106 |
welcomeUserArray = welcomeUser.split('@')
|
| 107 |
welcomeUserStr = welcomeUserArray[0].replace('.',' ')
|
| 108 |
-
await cl.Message(f"> Bonjour {welcomeUserStr}").send()
|
| 109 |
-
await cl.Message(
|
| 110 |
-
|
| 111 |
-
).send()
|
| 112 |
-
|
|
|
|
| 113 |
from langchain_core.prompts.prompt import PromptTemplate
|
| 114 |
|
| 115 |
_template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language.
|
|
|
|
| 54 |
|
| 55 |
@cl.author_rename
|
| 56 |
def rename(orig_author: str):
|
| 57 |
+
rename_dict = {"DatapccSkillStream": "Skills Stream", "ConversationalRetrievalChain": "Assistant conversationnel 💬", "Retriever": "Agent conversationnel", "StuffDocumentsChain": "Chaîne de documents", "LLMChain": "Agent", "ChatOpenAI": "IA🤖"}
|
| 58 |
return rename_dict.get(orig_author, orig_author)
|
| 59 |
|
| 60 |
@cl.action_callback("download")
|
|
|
|
| 105 |
welcomeUser = app_user.identifier
|
| 106 |
welcomeUserArray = welcomeUser.split('@')
|
| 107 |
welcomeUserStr = welcomeUserArray[0].replace('.',' ')
|
| 108 |
+
await cl.Message(f"> Bonjour {welcomeUserStr}\n\n✨ Commencez à poser vos questions sur les données \"{chat_profile}\"\n- Création de BCC à partir d'une liste de savoirs ou d'objectifs pédagogiques\n- Création d'un tableau récapitulatif \"Savoirs ou Objectifs pédagogiques\" | \"BCC\"\n- Répondez aux 2 questions qui vont suivre :").send()
|
| 109 |
+
#await cl.Message(
|
| 110 |
+
# author="Datapcc 🌐🌐🌐",content=f"✨ Commencez à poser vos questions sur les données \"{chat_profile}\"\n- Création de BCC à partir d'une liste de savoirs ou d'objectifs pédagogiques\n- Création du tableau de la version n°1 de la maquette de formation"
|
| 111 |
+
#).send()
|
| 112 |
+
goOF1 = await cl.AskUserMessage(content="A partir de quelle formation, voulez-vous créer des BCC? Répondez dans le prompt.", timeout=300).send()
|
| 113 |
+
goOF2 = await cl.AskUserMessage(content="Coller dans le prompt la liste de vos savoirs ou de vos objectifs pédagogiques.", timeout=300).send()
|
| 114 |
from langchain_core.prompts.prompt import PromptTemplate
|
| 115 |
|
| 116 |
_template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language.
|