Spaces:
Running
Running
File size: 699 Bytes
7f1117a 9c9fc77 7f1117a 9c9fc77 7f1117a 9c9fc77 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import asyncio
import logging
from ai_core_agix import AICore
async def main():
try:
logging.info("Initializing AI Core...")
ai_core = AICore(config_path="config.json")
query = "What is the latest in AI advancements?"
logging.info(f"Processing query: {query}")
response = await ai_core.generate_response(query, user_id=1)
logging.info("Response received successfully.")
print("AI Response:", response)
await ai_core.http_session.close()
logging.info("Closed AI Core session.")
except Exception as e:
logging.error(f"An error occurred: {e}")
if __name__ == "__main__":
asyncio.run(main()) |