Raiff1982 commited on
Commit
9c9fc77
·
verified ·
1 Parent(s): e424986

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +17 -7
main.py CHANGED
@@ -1,12 +1,22 @@
1
  import asyncio
2
- from ai_system.ai_core_agix import AICoreAGIX
 
3
 
4
  async def main():
5
- ai_core = AICoreAGIX(config_path="config.json")
6
- query = "What will be the next breakthrough in AI?"
7
- response = await ai_core.generate_response(query, user_id=1)
8
- print(response)
9
- await ai_core.http_session.close()
 
 
 
 
 
 
 
 
 
10
 
11
  if __name__ == "__main__":
12
- asyncio.run(main())
 
1
  import asyncio
2
+ import logging
3
+ from ai_core_agix import AICore
4
 
5
  async def main():
6
+ try:
7
+ logging.info("Initializing AI Core...")
8
+ ai_core = AICore(config_path="config.json")
9
+ query = "What is the latest in AI advancements?"
10
+ logging.info(f"Processing query: {query}")
11
+
12
+ response = await ai_core.generate_response(query, user_id=1)
13
+ logging.info("Response received successfully.")
14
+ print("AI Response:", response)
15
+
16
+ await ai_core.http_session.close()
17
+ logging.info("Closed AI Core session.")
18
+ except Exception as e:
19
+ logging.error(f"An error occurred: {e}")
20
 
21
  if __name__ == "__main__":
22
+ asyncio.run(main())