mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* move agent to langchains_agent * remove old .env * remove the old agent folder * add preliminary version of Agent abstraction * add preliminary version of the main.py * merge controlloop and main into a Agent class * add init * fix json import * fix missing arg * get langchains_agent working after abstraction * rename `research` to `agenthub` * rename: rename research to agenthub --------- Co-authored-by: huybery <huybery@gmail.com>
8 lines
258 B
Python
8 lines
258 B
Python
def kill(id, agent):
|
|
if id < 0 or id >= len(agent.background_commands):
|
|
raise ValueError('Invalid command id to kill')
|
|
agent.background_commands[id].kill()
|
|
agent.background_commands.pop(id)
|
|
return "Background command %d killed" % id
|
|
|