mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04: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>
9 lines
179 B
Python
9 lines
179 B
Python
import json
|
|
|
|
def my_encoder(obj):
|
|
if hasattr(obj, "to_dict"):
|
|
return obj.to_dict()
|
|
|
|
def dumps(obj, **kwargs):
|
|
return json.dumps(obj, default=my_encoder, **kwargs)
|