mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-10 12:09:43 +00:00
BIG PYTHON REFACTOR
Python scripts moved out of python/ folder to root to be unified with plugins + frontend extension around api calls
This commit is contained in:
parent
f94b7d742c
commit
d02dda3667
326 changed files with 1096 additions and 862 deletions
|
|
@ -1,17 +0,0 @@
|
|||
from python.helpers.api import ApiHandler, Input, Output, Request, Response
|
||||
|
||||
from python.helpers import persist_chat
|
||||
|
||||
class ExportChat(ApiHandler):
|
||||
async def process(self, input: Input, request: Request) -> Output:
|
||||
ctxid = input.get("ctxid", "")
|
||||
if not ctxid:
|
||||
raise Exception("No context id provided")
|
||||
|
||||
context = self.use_context(ctxid)
|
||||
content = persist_chat.export_json_chat(context)
|
||||
return {
|
||||
"message": "Chats exported.",
|
||||
"ctxid": context.id,
|
||||
"content": content,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue