File size: 1,275 Bytes
6a8333f |
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
import openai
from dotenv import load_dotenv
import os
from mistralai import Mistral
from dotenv import load_dotenv
load_dotenv()
api_key = os.getenv("MISTRAL_API_KEY")
model = "mistral-large-latest"
client = Mistral(api_key=api_key)
while True:
chat_response = client.chat.complete(
model=model,
messages=[{"role":"user", "content":input("Enter your message: ")}]
)
if chat_response.choices[0].message.content == "Goodbye":
break
print(chat_response.choices[0].message.content)
print("Aurevoir")
#
# stellar = Stellar()
# atlas = Atlas()
# lilith = Lilith()
# pythagoras = Pythagoras()
# shaka = Shaka()
# edison = Edison()
# york = York()
#
# stellar.register_satellites(atlas)
# stellar.register_satellites(lilith)
# stellar.register_satellites(pythagoras)
# stellar.register_satellites(shaka)
# stellar.register_satellites(edison)
# stellar.register_satellites(york)
#
#
# # Exemple de communication
# response = stellar.route_communication("Shaka", "Atlas", {"type": "monitor_directory", "content": "Suspicious activity detected"})
# print(response)
#
# # Exemple de diffusion
# results = stellar.broadcast_message("Shaka", {"type": "ethics_update", "content": "New ethical guidelines"})
# print(results)
|