Suppose there are two users: userA and userB. They use the following PowerShell code and send the HTTP requests respectively., The expected output results are as follows.
-------------------------------------------------------------------------------------------------------------------------------------------------------
# UserA 1
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'What is the capital of Japan?' }
#The correct answer: The capital of Japan is Tokyo.
# UserA 2
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'Translate the previous answer into French.' }
#The correct answer: La capitale du Japon est Tokyo.
-------------------------------------------------------------------------------------------------------------------------------------------------------
# UserB 1
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'What is the capital of the United States?' }
#The correct answer: The capital of the United States is Washington, D.C.
# UserB 2
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'Translate the previous answer into Japanese.' }
#The correct answer: アメリカ合衆国の首都はワシントンD.C.です.
-------------------------------------------------------------------------------------------------------------------------------------------------------
How can the above functionality be achieved? Are there any relevant libraries that can accomplish the above functionality?
-------------------------------------------------------------------------------------------------------------------------------------------------------
# UserA 1
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'What is the capital of Japan?' }
#The correct answer: The capital of Japan is Tokyo.
# UserA 2
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'Translate the previous answer into French.' }
#The correct answer: La capitale du Japon est Tokyo.
-------------------------------------------------------------------------------------------------------------------------------------------------------
# UserB 1
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'What is the capital of the United States?' }
#The correct answer: The capital of the United States is Washington, D.C.
# UserB 2
Invoke-RestMethod http://localhost:4455/GetGPTMes -Method Post -Body @{ userMes = 'Translate the previous answer into Japanese.' }
#The correct answer: アメリカ合衆国の首都はワシントンD.C.です.
-------------------------------------------------------------------------------------------------------------------------------------------------------
How can the above functionality be achieved? Are there any relevant libraries that can accomplish the above functionality?