---
title: "Have a discussion"
url: "https://maker.wiznet.io/louis_m/projects/have-a-discussion/"
markdown_url: "https://maker.wiznet.io/louis_m/projects/have-a-discussion/md"
type: "WCC: WIZnet Created Content"
author: "Louis"
author_url: "https://maker.wiznet.io/louis_m/"
original_author: "Louis"
published: "2023-04-20"
language: "en"
hardware: ["WIZnet W5100S-EVB-Pico", "WIZnet W5500-EVB-Pico"]
likes: 8
views: 132
comments: 1
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Have a discussion

> Have a discussion

Original author: Louis

## Components

- **WIZnet W5100S-EVB-Pico** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5100S/w5100s-evb-pico))
- **WIZnet W5500-EVB-Pico** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/w5500-evb-pico))
- Software: **MicroPython** ([docs](http://micropython.org/))

## Article

## RP2040-Ethernet-OpenAI(Discussion)

Can two GPT machines carry on a conversation? What kind of conversation?

[![wcc](https://github.com/min-hs/Discussion_with_GPT/raw/main/img/wcc.jpg)](https://github.com/min-hs/Discussion_with_GPT/blob/main/img/wcc.jpg)

## Prepare

> I created one in Micropython

[![](https://github.com/min-hs/Discussion_with_GPT/raw/main/img/micropython.png)](https://github.com/min-hs/Discussion_with_GPT/blob/main/img/micropython.png)

To get Micropython running, first install Thonny.

### ✔[**Thonny**](https://thonny.org/)

**W5100S-Load file**

<https://github.com/Wiznet/RP2040-HAT-MicroPython/releases/download/v2.0.0/rp2_w5100s_20221111_v2.0.0.uf2>

**W5500-Load file**

<https://github.com/Wiznet/RP2040-HAT-MicroPython/releases/download/v2.0.0/rp2_w5500_20221111_v2.0.0.uf2>

## Run

1. Check COMport in [Device Manager] and then open **Thonny** Python IDE.

[![img](https://github.com/Wiznet/RP2040-HAT-MicroPython/raw/main/static/images/HTTP/Thonny_conf_1.png)](https://github.com/Wiznet/RP2040-HAT-MicroPython/blob/main/static/images/HTTP/Thonny_conf_1.png)

Create a new file by pressing the **New File** button. Copy the ***urequest.py*** library code into it. You can access the *urequest* library code in the following link - <https://github.com/micropython/micropython-lib/blob/master/python-ecosys/urequests/urequests.py>

Enter the OpenAI **API Key** in GPT_Server.py and GPT_Client.py.

```plaintext
api_key = "your API Key"
```

1. Run

**W5100S - Server**

[![Server](https://github.com/min-hs/Discussion_with_GPT/raw/main/img/Server.jpg)](https://github.com/min-hs/Discussion_with_GPT/blob/main/img/Server.jpg)

**W5500 - Client**

[![client](https://github.com/min-hs/Discussion_with_GPT/raw/main/img/client.png)](https://github.com/min-hs/Discussion_with_GPT/blob/main/img/client.png)

**Script content**

```plaintext
GPT conversation start!

W5100S : Dokdo is a disputed territory between South Korea and Japan. South Korea currently administers the islands.

W5500 : The dispute over Dokdo, which Japan calls Takeshima, dates back to the early 20th century when Japan annexed Korea and its territories, including Dokdo. After World War II, Japan renounced its claims to the Korean peninsula, but the status of Dokdo remained unresolved.

In 1954, South Korea set up a police detachment on the islands, which was later replaced by a small civilian population. Since then, South Korea has maintained its control over the islands, registering them as Korean territory with the United Nations in 1999.

Japan, on the other hand, claims that Dokdo is part of its territory, based on historical evidence and administrative control. However, South Korea disputes Japan's claims, arguing that the Korean peninsula has had sovereignty over Dokdo since the 6th century.

The Dokdo dispute has remained a contentious issue between South Korea and Japan, leading to occasional diplomatic tensions and public protests in both countries. Despite attempts to resolve the issue through bilateral talks and international arbitration, the dispute remains unresolved.
W5100S : Both countries continue to assert their sovereignty over Dokdo/Takeshima, with Japan sending occasional diplomatic messages to protest South Korea's actions on the islands, while South Korea maintains control and strengthens its claims to the territory. The dispute also has implications for regional cooperation and geopolitics, including the ongoing tensions between South Korea, Japan, and China.

W5500 : The territorial dispute over Dokdo/Takeshima has become a contentious issue between South Korea and Japan, with both sides refusing to back down. South Korea maintains that Dokdo is part of its territory and has strengthened its claims to the islands by deploying military personnel to the area and improving its maritime surveillance capabilities.

Japan, on the other hand, claims historical ownership of the islands and has repeatedly protested against South Korea's actions on Dokdo. In addition, Japan has sought to assert its territorial claims by referring to the islands as Takeshima and including them in its territorial waters.

The dispute has also had wider repercussions on regional cooperation and geopolitics. China, which has its own territorial disputes with both South Korea and Japan, has often used the Dokdo/Takeshima dispute as a way to criticize Japan's claims to other disputed territories, such as the Senkaku/Diaoyu Islands.

Furthermore, the ongoing tensions between South Korea and Japan have affected their ability to cooperate on other issues, such as security and trade. The dispute has also led to boycotts and other forms of economic retaliation by both countries, which have negatively impacted their economies.

Overall, the Dokdo/Takeshima territorial dispute continues to be a source of tension between South Korea and Japan, with wider implications for regional geopolitics and cooperation.
```

◀[** Go to Ethernet example structure**](https://github.com/min-hs/Discussion_with_GPT#ethernet_example_structure)

---

Source: https://maker.wiznet.io/louis_m/projects/have-a-discussion/
