from aiohttp import web from server.controller.ChatComplete import ChatComplete def register_route(app: web.Application): app.router.add_routes([ web.route('*', '/chatcomplete/conversation_chunk/list', ChatComplete.get_conversation_chunk_list), web.route('*', '/chatcomplete/conversation_chunk/info', ChatComplete.get_conversation_chunk), web.route('POST', '/chatcomplete/conversation/fork', ChatComplete.fork_conversation), web.route('POST', '/chatcomplete/message', ChatComplete.start_chat_complete), web.route('GET', '/chatcomplete/message/stream', ChatComplete.chat_complete_stream), web.route('POST', '/chatcomplete/get_point_usage', ChatComplete.get_point_usage), web.route('*', '/chatcomplete/persona/list', ChatComplete.get_persona_list), web.route('*', '/chatcomplete/persona/info', ChatComplete.get_persona_info), ])