currently, use asycn approach to ensure data intergrity, use asyncio.run(your_func()) to run, your_func() also has to be async
if don't need to consider data intergrity, delete all async declare before functions and run normally
GroupIndex (specify by GroupID): { (specify by id auto assigned) user (news source?) url message (news) embedding date }
UserIndex: { (specify by userID) embedding (768, currently for testing only 3) date date_before (can search from date ~ date_before) }
requires userID, add new object for user setting returns bool indicate success
requires userID, update user setting returns bool indicate success
it will first use GetMessageMethod() to get old setting
requires GroupID, add new index for Group
initially, there's a object with id=1, which is used to keep track of total number of object returns bool indicate success
requires GroupID, _message, _embedding, _date returns bool indicate success
it will first use GetMessageMethod() to get number count of objects, then assign new object with id = count+1
currently only requires userID, will perform search based on userSetting returns a dict containing information of best match data
straightforward, returns a dict containing information
python file calls requests.get() -> aws api geteway -> aws lambda (function written in /my-opensearch-function/opensearch-lambda.py) -> aws opensearch
if need to add new field, adjust api gateway on aws console -> modify lambda func and upload to aws lambda
https://search-linebot-search-3uafa4oepdfjx4tfk3emvsh5a4.aos.ap-northeast-3.on.aws/_dashboards name: Eric, passwd:LiuLiuLeeLai123!
can see and manually delete index
User: test-user3 Group: stocks, sports,
git clone https://github.com/eric114610/linebot-search.git
cd linebot-search
python >= 3.0
virtualenv linebot
source linebot/bin/activate
pip install -r requirements.txt
Security : Requires a https domain name (noip and certbot)
Firewall : Open port 5000 and 443 for the flask app
python main.py