datacipen commited on
Commit
101f362
·
verified ·
1 Parent(s): d5043df

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -4
main.py CHANGED
@@ -50,9 +50,8 @@ def Chargement_des_datas_web(profile):
50
  fileOpen.close()
51
  return txt
52
 
53
- #@cl.step(type="llm", show_input=True)
54
- @cl.cache
55
- async def Connexion_Mistral():
56
  return ChatCompletionsClient(
57
  endpoint="https://models.inference.ai.azure.com",
58
  credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
@@ -307,7 +306,7 @@ async def chat_profile():
307
 
308
  @cl.on_chat_start
309
  async def on_chat_start():
310
- client = await Connexion_Mistral()
311
  cl.user_session.set("client", client)
312
 
313
  @cl.on_message
 
50
  fileOpen.close()
51
  return txt
52
 
53
+ @cl.step(type="llm", show_input=True)
54
+ def Connexion_Mistral():
 
55
  return ChatCompletionsClient(
56
  endpoint="https://models.inference.ai.azure.com",
57
  credential=AzureKeyCredential(os.environ["GITHUB_TOKEN"]),
 
306
 
307
  @cl.on_chat_start
308
  async def on_chat_start():
309
+ client = Connexion_Mistral()
310
  cl.user_session.set("client", client)
311
 
312
  @cl.on_message