← back to Exo
dont explicitly specify show_index
127b8e011cc6038a447f3030e0cda3ce413b9c98 · 2024-07-17 20:32:33 -0700 · Alex Cheema
Files touched
Diff
commit 127b8e011cc6038a447f3030e0cda3ce413b9c98
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Wed Jul 17 20:32:33 2024 -0700
dont explicitly specify show_index
---
exo/api/chatgpt_api.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/exo/api/chatgpt_api.py b/exo/api/chatgpt_api.py
index 8acfcaf5..a760b672 100644
--- a/exo/api/chatgpt_api.py
+++ b/exo/api/chatgpt_api.py
@@ -127,7 +127,7 @@ class ChatGPTAPI:
})
self.static_dir = Path(__file__).parent.parent.parent / 'tinychat/examples/tinychat'
self.app.router.add_get('/', self.handle_root)
- self.app.router.add_static('/', self.static_dir, name='static', show_index=False)
+ self.app.router.add_static('/', self.static_dir, name='static')
async def handle_root(self, request):
return web.FileResponse(self.static_dir / 'index.html')
@@ -236,10 +236,3 @@ class ChatGPTAPI:
site = web.TCPSite(runner, host, port)
await site.start()
if DEBUG >= 0: print(f"ChatGPT API server started at http://{host}:{port}")
-
-# Usage example
-if __name__ == "__main__":
- loop = asyncio.get_event_loop()
- node = Node() # Assuming Node is properly defined elsewhere
- api = ChatGPTAPI(node)
- loop.run_until_complete(api.run())
← a94bdbb9 serve tinychat static
·
back to Exo
·
add endpoint to get number of encoded tokens d4e0a7d1 →