Latest Entries »

Firmware – Asuswrt-Merlin (NG) – 386.11_alpha1 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.11_alpha1 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (386_x).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.11_alpha1.trx
Download: RT-AC68U_386.11_alpha1.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

ChatGPT/Ansible – Send queries and receive responses using Infrastructure as Code

ChatGPT is an AI-powered chatbot designed to provide natural language generations and follow-up questions to enable users to have natural, free-flowing conversations. It is powered by OpenAI‘s GPT-3 AI language model, and its goal is to enable people to have natural conversations with AI-driven chatbots.

The above was written using ChatGPT.

In this article we will use Ansible (Infrastructure as Code) to query ChatGPT and receive responses. We will use Elchico2007‘s collection and OpenAI‘s module to accomplish this.

We will use the same base path of ‘dev’ that was previously created, and use ~/.local/bin for certain binaries.

Please Sign up to OpenAI’s ChatGPT here.

–>
Go in to the dev directory/link located within your home directory:

$ cd ~/dev

Install/Upgrade Ansible:

$ pip3 install ansible --upgrade --user && chmod 754 ~/.local/bin/ansible ~/.local/bin/ansible-playbook ~/.local/bin/ansible-galaxy

Install/Upgrade OpenAI’s module:

$ pip3 install openai --upgrade --user

Install/Upgrade JMESPath (so we may use json_query to parse output):

$ pip3 install jmespath --upgrade --user

Create a Ansible work folder and change in to the base path:

$ mkdir -p ansible/chatgpt/inventory && cd ansible/chatgpt

Create an Ansible configuration where we will target the collections install, in to this space:

$ cat << 'EOF' > ansible.cfg
> [defaults]
> collections_paths = ./collections
> EOF

Install Elchico2007’s ChatGPT collection:

$ ansible-galaxy collection install elchico2007.chatgpt

Create an Ansible inventory, which adds a local group, lists your local host and specifies the connection to be local:

$ cat << 'EOF' > inventory/static-hostname
> [local]
> localhost ansible_connection=local
> EOF

Create an Ansible playbook, which will query ChatGPT and print the response from it:

$ cat << 'EOF' > chatgpt.yml
> # Query ChatGPT and receive responses
> ---
> - hosts: local
> 
>   tasks:
>     - name: Query ChatGPT
>       elchico2007.chatgpt.gpt3:
>         api_key: "{{ lookup('env', 'CHATGPT_API_KEY', default='') }}"
>         model: "{{ lang_model | d('text-davinci-003', true) }}"
>         input: "{{ chatgpt_query | d('What is ChatGPT?', true) }}"
>         instruction: "{{ perform_action | d('', true) }}"
>       register: chatgpt
>
>     - name: Output ChatGPT's response
>       debug:
>         msg: "{{ chatgpt.output | json_query('choices[].text') }}"
>       when: chatgpt
> EOF

‘Create a new secret key’ here and take note of it.

Run the default query (replace <API key> with the API key you received from ‘Create a new secret key’):

$ CHATGPT_API_KEY=<API key> ansible-playbook -i inventory/ chatgpt.yml

It should return similarly:

TASK [Output ChatGPT's response] ***************************************************************************************
ok: [localhost] => {
    "msg": [
        "ChatGPT is an AI-powered chatbot designed to provide natural language generations and follow-up questions to enable users to have natural, free-flowing conversations. It is powered by OpenAI's GPT-3 AI language model, and its goal is to enable people to have natural conversations with AI-driven chatbots."
    ]
}

Ask it a question (replace <API key> with the API key you received from ‘Create a new secret key’):

$ CHATGPT_API_KEY=<API key> ansible-playbook -i inventory/ chatgpt.yml -e 'chatgpt_query="What is Droid Basement?"'

It should return similarly:

TASK [Output ChatGPT's response] ***************************************************************************************
ok: [localhost] => {
    "msg": [
        "Droid Basement is an Android enthusiast blog founded in 2012. It provides users with the latest news, reviews and information on Android devices, applications, and accessories. The blog includes tutorials and guides, development resources, and other Android-related content."
    ]
}

Prompt it to perform a correction for you (replace <API key> with the API key you received from ‘Create a new secret key’):

$ CHATGPT_API_KEY=<API key> ansible-playbook -i inventory/ chatgpt.yml -e 'lang_model=text-davinci-edit-001 chatgpt_query="I lick teeching." perform_action="Fix my grammar"'

It should return similarly:

TASK [Output ChatGPT's response] ***************************************************************************************
ok: [localhost] => {
    "msg": [
        "I like teaching."
    ]
}

You can set your API key in an environment variable so it (CHATGPT_API_KEY) does not need to be specified when executing ‘ansible-playbook’ (replace <API key> with the API key you received from ‘Create a new secret key’):

$ export CHATGPT_API_KEY="<API key>"

To unset the environment variable:

$ unset CHATGPT_API_KEY

<–

Source:

elchico2007.chatgpt

ChatGPT/Terraform – Send queries and receive responses using Infrastructure as Code

ChatGPT is an AI-powered chatbot developed by OpenAI. It uses natural language processing technology to generate intelligent, personalized responses to user queries in real-time. It combines the power of a neural network with the natural conversational techniques used by real people.

The above was written using ChatGPT.

In this article we will use Terraform (Infrastructure as Code) to query ChatGPT and receive responses. We will use Develeap‘s provider to accomplish this.

We will use the same base path of ‘dev’ that was previously created and use ~/.local/bin for certain binaries.

Please Sign up to OpenAI’s ChatGPT here.

–>
Go in to the dev directory/link located within your home directory:

$ cd ~/dev

Grab/Update to the latest version of Terraform:

$ wget https://releases.hashicorp.com/terraform/1.4.2/terraform_1.4.2_linux_amd64.zip

Install Unzip if you do not have it installed:

$ sudo apt update && sudo apt -y install unzip

Unzip it to ~/.local/bin and set permissions accordingly on it (type y and hit enter to replace if upgrading, at the prompt):

$ unzip terraform_1.4.2_linux_amd64.zip -d ~/.local/bin && chmod 754 ~/.local/bin/terraform

Create a Terraform work folder and change in to the base path:

$ mkdir -p terraform/chatgpt && cd terraform/chatgpt

Pin the Terraform version to greater then or equal to 1.4:

$ cat << 'EOF' > versions.tf
> terraform {
>   required_version = ">= 1.4.0"
> }
> EOF

Set query as a variable and assign it a default value:

$ cat << 'EOF' > vars.tf
> variable "query" {
>   default = "What is ChatGPT?"
> }
> EOF

Add the ChatGPT provider from Develeap:

$ cat << 'EOF' > provider.tf
> terraform {
>   required_providers {
>     chatgpt = {
>       version = "0.0.1"
>       source  = "develeap/chatgpt"
>     }
>   }
> }
>
> provider "chatgpt" {
>   # CHATGPT_API_KEY="<API key>" terraform apply -auto-approve
> }
> EOF

Add the ChatGPT resource:

$ cat << 'EOF' > chatgpt.tf
> resource "chatgpt_prompt" "query" {
>   max_tokens = 256
>   query      = "${var.query}"
> }
> EOF

Output the response to our query:

$ cat << 'EOF' > output.tf
> output "query_result" {
>   value = chatgpt_prompt.query.result
> }
> EOF

‘Create a new secret key’ here and take note of it.

Initialize the Terraform directory:

$ terraform init

Run the default query (replace <API key> with the API key you received from ‘Create a new secret key’):

$ CHATGPT_API_KEY="<API key>" terraform apply -auto-approve

It should return:

Outputs:

query_result = "ChatGPT is an AI-powered chatbot developed by OpenAI. It uses natural language processing technology to generate intelligent, personalized responses to user queries in real-time. It combines the power of a neural network with the natural conversational techniques used by real people."

Ask it a question (replace <API key> with the API key you received from ‘Create a new secret key’):

$ CHATGPT_API_KEY="<API key>" terraform apply -var "query=What is Droid Basement?" -auto-approve

It should return:

Outputs:

query_result = "Droid Basement is a website dedicated to providing Android users with tutorials on rooting, ROMs and other custom development tasks. The site also offers popular downloads, forums, and articles related to Android development."

You can set your API key in an environment variable so it (CHATGPT_API_KEY) does not need to be specified when executing ‘terraform’ (replace <API key> with the API key you received from ‘Create a new secret key’):

$ export CHATGPT_API_KEY="<API key>"

To unset the environment variable:

$ unset CHATGPT_API_KEY

<–

Source:

terraform-provider-chatgpt

Firmware – Asuswrt-Merlin (NG) – 386.10_0 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.10_0 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (386_x).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.10_0.trx
Download: RT-AC68U_386.10_0.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 386.10_beta1 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.10_beta1 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (386_x).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.10_beta1.trx
Download: RT-AC68U_386.10_beta1.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 386.10_alpha1 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.10_alpha1 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (386_x).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.10_alpha1.trx
Download: RT-AC68U_386.10_alpha1.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 386.5_0 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.5_0 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.5_0.trx
Download: RT-AC68U_386.5_0.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 386.4_0 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.4_0 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.4_0.trx
Download: RT-AC68U_386.4_0.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 386.3_2 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.3_2 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.3_2.trx
Download: RT-AC68U_386.3_2.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).

Firmware – Asuswrt-Merlin (NG) – 386.3_1 – RT-AC68

This is Merlin’s Asuswrt (NG) 386.3_1 for the ASUS RT-AC68U/R.

-sync latest changes from RMerlin (master).

—–

Download (ASUS RT-AC68U/R):
RT-AC68U_386.3_1.trx
Download: RT-AC68U_386.3_1.trx

—–

Source:
https://github.com/pershoot/asuswrt-merlin.ng
https://github.com/RMerl/asuswrt-merlin.ng

——–

Installation instructions:

-Flash the .trx through the UI
-After it is completed and you are returned back to the UI, wait a short while (~30 seconds) then power cycle the router (with the on/off button).