Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTTP request Multiple conversations with ChatGPT while keeping context
#4
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?


Messages In This Thread
RE: HTTP request Multiple conversations with ChatGPT while keeping context - by Davider - 04-28-2024, 11:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)