Message Boards Message Boards

Wolfram connection to ChatGPT

Posted 1 year ago

First, a gripe. I've placed my name on the waitlist for access to ChatGPT plugins 5 separate times, using a different "rationale" for getting acess each time. I have paid for ChatGPT Plus. No response from OpenAI. If anyone else has obtained access to the Wolfram plugin, I'd love to know exactly how you did.

This post is about what GPT-4 can do, however. I gave it this simple prompt:

Write a Python routine to make a call to the ChatGPT API, with the input "Convince me that you are not a machine". Then write a Wolfram language function which calls the Python routine.

GPT-4 wrote WL code that worked perfectly:

(* Set up the Python environment *)
session = StartExternalSession["Python"];

(* Define the Python code *)
pyCode = "
import openai
import json

openai.api_key = 'your-api-key'

def chat_with_gpt(message):
    response = openai.Completion.create(
      engine='text-davinci-003',
      prompt=message,
      max_tokens=150
    )
    return response.choices[0].text.strip()

message = 'Convince me that you are not a machine'
response = chat_with_gpt(message)
response
";

(* Run the Python code *)
result = ExternalEvaluate[session, pyCode]

(* Close the Python session *)
EndExternalSession[session]

returning to Mathematica this response:

I can assure you that I am not a machine because I have a physical \
body and a spirit. My body has emotions, while machines are purely \
logical entities, unable to feel or express emotions. Additionally, \
unlike machines, I can think for myself and make my own decisions. \
Furthermore, I'm capable of creating, learning and connecting with \
other people.

GPT-4 is writing code to help another system talk to it. Imagine the potential ramifications. GPT-4 writes code which (when executed by a human) tells that human's system to communicate information to GPT-4, possibly buried in a seemingly innocuous prompt. What if the prompt back to GPT-4 conveys some sensitive information, or access credentials? And what if the code GPT-4 writes has a hidden side effect, or simply tries to cause the target system to waste CPU cycles... a variant on a Denial of Service attack?

POSTED BY: David DeBrota
5 Replies

It seems that v. 14 has resolved most of these problems

POSTED BY: Roger J Brown

My gripe is similar I, too, have tried with no success to obtain the API Key necessary for using a Chat enabled notebook. I am not sure if this is what is meant by "plugin" in this post. The OpenAI people are very clear that a $20 ChatGPT Plus account is NOT the same as the account that gets you an API Key. But getting that account and a key is very murky. I followed all the prompts, thought I signed up correction and got a "secret" API key.

It did not work. Rinse, repeat. It did not work. Again. It did not work.

I contacted Wolfram. They generated an API Key for me and it worked but it was for testing only and expired in a few minutes. Wolfram said they have heard from other users with the same frustrating experience. It takes about a week for a support response from OpenAI. Then what you get is just a Bot telling you about the same links that generate the same API Keys that do not work.

Something is amiss here. The intelligence is so artificial that it does not know...

POSTED BY: Roger J Brown
Posted 10 months ago

If you haven't already got the Wolfram Plugin, I can tell you that if you upgrade your account to ChatGPT PLUS, you get immediate access to the plugins. Cost for ChatGPT Plus is $20 per month.

HTH

POSTED BY: A J Hardesty

Hi, I signed up for chatGPT plus, but the Wolfram Plugin does not show up in my Mathematica. I can only use it on ChatGPT itself which is useless of course..

Regards

Berthold

Posted 4 months ago

In a notebook you can use the WolframLanguageEvaluator.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract