Spaces:
Runtime error
Runtime error
| import chainlit as cl | |
| import sys, os | |
| # ─── Ensure utils/ is importable ────────────────────────────── | |
| ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) | |
| if ROOT_PATH not in sys.path: | |
| sys.path.insert(0, ROOT_PATH) | |
| from utils.backend import run_llm | |
| async def start(): | |
| await cl.Message(content="Hello 👋, I’m Omniscient! Ask me anything about logs, files, or scripts.").send() | |
| async def main(message: cl.Message): | |
| ai_input = message.content | |
| reply = run_llm(ai_input) | |
| # Send reply | |
| await cl.Message(content=reply).send() | |