# docker-matrixbot-chatgpt Maubot (Matrix/Synapse Python Bot) plus chatGPT /OpenAI integration with docker-compose. #### Run after setup correctly Matrix/Synapse server also with docker and traefik ``` cd ./dockers/ && docker-compose up -d ``` #### Tweak Maubot configs inside ``` ./data/maubot/data/config.yaml ``` #### Compile and load chatGPT echo plugin exec to maubot docker with: ``` docker exec -ti maubot /bin/sh ``` and run: ``` mbc build /path/to/plugin-code-directory ``` If first time upload plugin need login to maubot: ``` mbc login ``` with: ``` ? Username admin ? Password ? Server http://localhost:29316 ? Alias maubot ``` Then upload plugin: ``` mbc upload /path/to/plugin-mbc-directory ``` #### Workaround for self-signed certs turning of SSL cert check: vi /usr/lib/python3.9/site-packages/aiohttp/connector.py class TCPConnector(BaseConnector): """TCP connector. verify_ssl - Set to True to check ssl certifications. fingerprint - Pass the binary sha256 digest of the expected certificate in DER format to verify that the certificate the server presents matches. See also https://en.wikipedia.org/wiki/Transport_Layer_Security#Certificate_pinning resolver - Enable DNS lookups and use this resolver use_dns_cache - Use memory cache for DNS lookups. ttl_dns_cache - Max seconds having cached a DNS entry, None forever. family - socket address family local_addr - local tuple of (host, port) to bind socket to keepalive_timeout - (optional) Keep-alive timeout. force_close - Set to True to force close and do reconnect after each request (and between redirects). limit - The total number of simultaneous connections.exec to maubot docker with: ``` docker exec -ti maubot /bin/sh ``` and run: ``` mbc build /path/to/plugin-code-directory ``` If first time upload plugin need login to maubot: ``` mbc login ``` with: ``` ? Username admin ? Password ********** ? Server http://localhost:29316 ? Alias maubot ``` Then upload plugin: ``` mbc upload /path/to/plugin-mbc-directory ``` turning of SSL cert check: vi /usr/lib/python3.9/site-packages/aiohttp/connector.py class TCPConnector(BaseConnector): """TCP connector. verify_ssl - Set to True to check ssl certifications. fingerprint - Pass the binary sha256 digest of the expected certificate in DER format to verify that the certificate the server presents matches. See also https://en.wikipedia.org/wiki/Transport_Layer_Security#Certificate_pinning resolver - Enable DNS lookups and use this resolver use_dns_cache - Use memory cache for DNS lookups. ttl_dns_cache - Max seconds having cached a DNS entry, None forever. family - socket address family local_addr - local tuple of (host, port) to bind socket to keepalive_timeout - (optional) Keep-alive timeout. force_close - Set to True to force close and do reconnect after each request (and between redirects). limit - The total number of simultaneous connections. limit_per_host - Number of simultaneous connections to one host. enable_cleanup_closed - Enables clean-up closed ssl transports. Disabled by default. loop - Optional event loop. """ def __init__( self, *, verify_ssl: bool = False, ##mmi limit_per_host - Number of simultaneous connections to one host. enable_cleanup_closed - Enables clean-up closed ssl transports. Disabled by default. loop - Optional event loop. """ def __init__( self, *, verify_ssl: bool = False, ##miles