Spaces:
Sleeping
Sleeping
File size: 649 Bytes
05919ff 522e6c3 f013b22 05919ff f013b22 05919ff f013b22 05919ff 16f1cd8 f013b22 05919ff 522e6c3 |
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 |
import os
os.environ["LOCALLLM"] = "llama3.2"
from flow import createFlow
from logger import Logger
import config
class Agent:
def __init__(self, logger):
self.logger = logger
def invoke(self, question):
flow = createFlow(self.logger)
shared = { "question": question }
flow.run(shared)
return shared["answer"]
if __name__ == "__main__":
from assignment_utils import getQuestionByPos
logger = Logger(config.logLevel,config.logFile)
agent = Agent(logger)
question = getQuestionByPos(0)
print(question)
response = agent.invoke(question['question'])
print(response)
|