Activating openaigateway: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
To run OpenAIGateway you need python 3.12 installed. It can be installed only from CentOS 9
To run OpenAIGateway you need python 3.12 installed. It can be installed only on CentOS 9


   dnf install python3.12 python3.12-pip python3.12-devel
   dnf install python3.12 python3.12-pip python3.12-devel

Revision as of 15:15, 26 April 2026

To run OpenAIGateway you need python 3.12 installed. It can be installed only on CentOS 9

 dnf install python3.12 python3.12-pip python3.12-devel
 pip3.12 install poetry
 pip3.12 install uvicorn
 pip3.12 install "uvicorn[standard]"
 pip3.12 install fastapi
 pip3.12 install aiohttp

The OpenAIGateway will be located in /usr/local/openaigateway and will run over port 9088

 poetry run uvicorn src.main:app --host 0.0.0.0 --port 9088

On asterisk, you need to configure the websocket_client.conf

 [openaibridge]                ; The connection name
 type = websocket_client       ; Must be "websocket_client"
 connection_type = per_call_config  ; "persistent" or "per_call_config"
                               ; Default: none
 uri = ws://127.0.0.1:9088     ; The URI needed to contact the remote server.
                               ; If you've enabled tls, use "wss" for the scheme.
                               ; Default: none
 protocols = media             ; The websocket protocol expected by the server.
                               ; Default: none