Activating openaigateway: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
To run OpenAIGateway you need python 3.12 installed. It can be installed only | 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 | ||
| Line 7: | Line 7: | ||
pip3.12 install fastapi | pip3.12 install fastapi | ||
pip3.12 install aiohttp | pip3.12 install aiohttp | ||
pip3.12 install aiomysql | |||
The OpenAIGateway will be located in /usr/local/openaigateway and will run over port 9088 | The OpenAIGateway will be located in /usr/local/openaigateway and will run over port 9088 | ||
| Line 23: | Line 24: | ||
protocols = media ; The websocket protocol expected by the server. | protocols = media ; The websocket protocol expected by the server. | ||
; Default: none | ; Default: none | ||
You need to configure /usr/local/openaigateway/.env with the MySQL details. If you are running the MySQL server on the default installation, just rename .env.sample in .env | |||
Latest revision as of 21:32, 28 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 pip3.12 install aiomysql
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
You need to configure /usr/local/openaigateway/.env with the MySQL details. If you are running the MySQL server on the default installation, just rename .env.sample in .env