MCPcopy Create free account
hub / github.com/InternScience/InternAgent / main

Function main

launch_qa.py:18–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17
18def main():
19 parser = argparse.ArgumentParser(description='InternAgent QA — one-shot question answering')
20 parser.add_argument('--question', '-q', required=True, help='Research question to answer')
21 parser.add_argument('--file', '-f', default=None, help='Optional file attachment')
22 parser.add_argument('--output', '-o', default=None, help='Write answer to this file path')
23 args = parser.parse_args()
24
25 agent = DRAgent(model='o4-mini', config={'mode': 'qa'})
26 answer = str(asyncio.run(
27 agent.execute({'task': args.question, 'file_path': args.file}, {})
28 ))
29 print(answer)
30 if args.output:
31 os.makedirs(os.path.dirname(os.path.abspath(args.output)), exist_ok=True)
32 with open(args.output, 'w', encoding='utf-8') as f:
33 f.write(answer)
34
35
36if __name__ == '__main__':

Callers 1

launch_qa.pyFile · 0.70

Calls 4

executeMethod · 0.95
DRAgentClass · 0.90
writeMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected