Skip to main content

Ask robot

for WeChat platform, offer api to do an ask robot.

install python from source

wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tar.xz
tar -xzvf Python-3.9.7.tar.xz

cd Python-3.9.7
./configure --prefix=/opt/idlepig/apps/python397
make
make altinstall

cd ~/code/venv
/opt/idlepig/apps/python397/bin/python3.9 -m venv wx
source ~/code/venv/wx/bin/activate

cd ~/code/wx
pip install -r requirements.txt

or install python directly

in centos

yum install python36u

env

create virtual environment and source

mkdir -p ~/code/venv
cd ~/code/venv
python3 -m venv wx
source ~/code/venv/wx/bin/activate

install ask_robot

pip install ask_robot

start flask service

you need set actual info for token, aes_key, appid

if you are in plaintext mode, just set token is ok.

export token=''
export app_id=''
export aes_key=''
export secret=''
export email_from=''
export email_password=''
export email_to=''
export chatgpt=''
nohup ask &

then http://0.0.0.0:8081 will work

install nginx

yum install nginx

vi /etc/nginx/nginx.conf

http {
...
upstream idlewith {
    server 127.0.0.1:8081;
  }
...
}

vi /etc/nginx/conf.d/default.conf

server {
    listen 80;
    server_name _;
    location / {
      proxy_pass http://idlewith;
    }
}

so, we map 80 port to 8081 port

start nginx

nginx

Metadata

Release files for ask-robot 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ask-robot 0.0.4
File Size Uploaded
ask_robot-0.0.4.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ask-robot 0.0.4
File Interpreter ABI Platform
ask_robot-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 39.7 kB

Release files / ask_robot-0.0.4.tar.gz

Download URL ask_robot-0.0.4.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
536ac78aa35230d7659e2329fa56b6a163e1c80c2dbb20f7f99c2a0b67bb1f4c
BLAKE2b-256 checksum
How to use checksums
c85cafd110e8fa76907a5ffa0d4706ff39143e3bec290b319c91c620f40b061c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.9.7 Darwin/21.5.0

Release files / ask_robot-0.0.4-py3-none-any.whl

Download URL ask_robot-0.0.4-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ab02d55d3122de9ce9d4f0df6217d3c74c8ffcb23e79ab30fd7a0a3810241ae
BLAKE2b-256 checksum
How to use checksums
68d041f42c060dbe1e210b80a243e20692e0e5b908a2e6b875184ac77ca5ac4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.9.7 Darwin/21.5.0

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page