Message Boards Message Boards

Try to use the Chat-enabled notebook and got an error

Posted 10 months ago

I just installed version 13.3 and wanted to play with the new chat-enabled notebook. However, when I choose to open one of those notebooks I get the following error:

PacletInstall::notavail: No appropriate paclet named Wolfram/Chatbook is available for download from any currently enabled paclet sites.

Do I have to install something before using it? I thought that the needed paclets came standard with the new version.

21 Replies
Posted 6 months ago

Thanks for the useful tips from this post, it allowed me to set up the API Key installation and start using the IA chat. However, I almost all the time face an error message "An unexpected error occurred. Failure Message: Unexpected response from OpenAI server with status code 400. Tag: Chatbook::UnknownStatusCode ] Then, I can't use the functionnality. Frustrating....

POSTED BY: Yvan Abbe
Posted 6 months ago

Hi Yvan,

The Chatbook paclet has been updated several times over the past few months. The latest version is 1.2.4 which was released today, Oct 24. What version do you have?

PacletFind["Wolfram/Chatbook"]

If it is not 1.2.4 then

PacletInstall[ResourceObject["Wolfram/Chatbook"]]

and select "Update".

This may not solve your problem but it is worth trying.

POSTED BY: Rohit Namjoshi
Posted 6 months ago

Hi Rohit, thanks for the info. So I have just installet the new paclet, but I got this message : "If you want to use the "Wolfram/Chatbook" paclet, you'll need to update your Wolfram System to version 13.2 or higher. Once you have the compatible version, you can try installing the paclet again." So I checked my version, and my version is 13.2.1 for Microsoft Windows (64-bit) (January 27, 2023) Then the chat told me another advise ! To use the "Wolfram/Chatbook" paclet, you will need to update your Wolfram System to version 13.3 or higher. Once you have updated your system, you should be able to use the paclet without any compatibility issues. And finally, my chat started to operate propoerly, like yesterday, but it seems that he works only when he wants ...

POSTED BY: Yvan Abbe
Posted 7 months ago

So does all this mean that the Chat functions in Wolfram Notebooks are not available in the free version even if I have a paid version of ChatGPT?

POSTED BY: Ralph Brown

I have had every experience discussed here. NEVER have I been able to use a Chat enabled notebook, always getting the "...exceeded your current quota..." message without every getting a proper response.

I have repeatedly generated API Keys. None work. I contacted Wolfram and they issued me a temporary API Key which worked but was immediately revoked as it was just for testing purposes.

For now we are going to have to just call the Chat enabled notebook a failure

POSTED BY: Roger J Brown
Posted 8 months ago

For now we are going to have to just call the Chat enabled notebook a failure

Since chat notebooks worked fine for you with the Wolfram supplied test API key and for many other users (including me), the problem is with the API key you are using and not chat notebooks. Have you tried accessing the API some other way, e.g. Python?

pip install openai

Then execute this Python code after replacing YOUR API KEY with your API key

import os
import openai
openai.api_key = "YOUR API KEY"

completion = openai.ChatCompletion.create(
  model="gpt-3.5-turbo",
  messages=[
    {"role": "user", "content": "What is ChatGPT."}
  ]
)

print(completion.choices[0].message.content)
POSTED BY: Rohit Namjoshi
Posted 8 months ago

It definitly helps to have your working credit card data entered into the open AI API website :)) All they need is your money. Then it'll work like a charm. enter image description here

POSTED BY: Andreas Walter

Just upgraded to 13.3 and I am already regretting it. The hype about the new version was about using chat-notebooks, but this is not enabled by default. I spent quite a bit of time searching for help because the documentation seemed to have nothing. Finally, from this and similar community posts I gather that I need to pay for API to use the main feature touted in the upgrade.

Hey Wolfram people, how about mentioning this in the documentation and glossy marketing brochures?

So far, my experience with 13.3 has been horrible. The interface is a downgrade from 13.1

POSTED BY: Volodymyr Babich

??? I've used it twice. I asked Mathematica to draw the Sin curve twice.

Weird. I have the paid version of ChatGPT and I've never gotten a message about going over the limit.

Do I have to give my Open Ai credentials (username, password) to Mahtematica to make it work fine?

Posted 10 months ago

I assume you entered your OpenAI API key when you used the chat-notebook for the first time. In that case the ChatGPT should work, if not I am in unchartered water..

POSTED BY: Dave Middleton
Posted 10 months ago

Dave, how can I enter my OpenAI API Key? I didn't find any description about it, nor is it mentioned in the Settings... of my Mathematica for MacOS. I have ChatGPT+ license and have my key available, of course.

POSTED BY: Adam Schmidt
Posted 10 months ago

If you start the Chat-Notebook for the first time, Mathematica should have shown you a separate window with a form to fill in your OpenAI API key. You need to do that again if you use LLMFunction for the first time.

enter image description here

If Mathematica did not show you the form, I assume you can try to re-install the (offending) paclet by uninstalling it first:

PacletUninstall["Wolfram/LLMFunctions"]'
PacletUninstall["Wolfram/Chatbook"]

My assumption seems to backed up here: https://mathematica.stackexchange.com/questions/285713/how-to-use-the-new-llmfunction/285714#285714

POSTED BY: Dave Middleton
Posted 10 months ago

Out of curiosity, do you have a ChatGPT Plus subscription, but no (trial) OpenAI API key?

For the OpenAI Mathematica notebook features (including chat) to work you need an OpenAI API key. You can get a key to use the API in a trial for 3 months (with a max rate and max $5, but it can get you far enough).

The ChatGPT Plus subscription and the OpenAI API are billed separately. The ChatGPT Plus subscription covers usage exclusively on the chat.openai.com platform and costs $20 per month, providing benefits such as general access even during peak times, faster response times, and priority access to new features and improvements.

On the other hand, the OpenAI API has its own separate pricing structure. It allows developers to integrate the OpenAI models, including ChatGPT, into their own applications or software. The API usage is billed based on the number of API calls made and the amount of tokens processed. The API usage is not covered by the ChatGPT Plus subscription, and it requires a separate subscription and separate payment.

POSTED BY: Dave Middleton
Posted 10 months ago

Glad to help. OpenAI Sales could do a bit better in communicating their service offerings.

Thanks for sharing the Expression to register your OpenAI API key; I was looking for it too :) Also it saves you the trouble to reinstall a paclet as I (and StackExchange) initially suggested as a work-around.

SystemCredential["OPENAI_API_KEY"]="<YOUR API KEY>";

To check if your API keys have been registered use this Expression:

SystemCredentialKeys[ All]

Enjoy the OpenAI LLM in Mathematica.

POSTED BY: Dave Middleton
Posted 10 months ago

I had the same. I think the installer did not include the Chatbook paclet installation.

I manually installed the paclet with:

PacletInstall["Wolfram/Chatbook"]

This solved the issue for me.

POSTED BY: Dave Middleton

Thanks Dave. I did what you suggested but now I get another error: enter image description here

Posted 10 months ago

The chat-notebook works, but the error is an OpenAI error:

A rate limit error indicates that you have hit your assigned rate limit. This means that you have sent too many tokens or requests in a given period of time, and the OpenAI services have temporarily blocked you from sending more.

POSTED BY: Dave Middleton
Posted 10 months ago

Had the same. Unfortunately, you also need to set up a paid account for the API. ChatGPT+ account does not work. They bill by the number of tokens used. It is basically only adding credit card credentials. I'd suggest you set up a limit, otherwise, you will wake up with a $120 charge on your credit card (default limit). Mathematica transfers the entire notebook (!) as prompt, so it might get pretty expensive pretty quickly.

POSTED BY: Adam Schmidt

To be clear, the entire notebook itself is not being sent as a prompt. Rather, it is elements of the chat history in the notebook that is being sent. This also gives insight as to why sometimes you may encounter a token limit error: if the history is too long and exceeds the token limit for the model that you are making use of.

POSTED BY: David Reiss
Posted 10 months ago

From, these notes, putting a ~ in a Notebook makes it fairly easy to partition the history. OTOH, using this technique to limit the consumption of LLM tokens sounds like a less-than-optimal solution.

I fondly hope that, in the future, Wolfram can obviate the need for tokens -- to have the LLM running locally. Between the GPU and the Neural Engine cores and unified memory, there seem to be plenty of untapped computrons on Apple Silicon PCs and iPads. I hope that Apple provides strategic support for WR and others to tap into those resources. Maybe Apple and Wolfram Research will be more closely aligned than they have been in a long time -- I'd love to see Wolfram Research participate in future Apple presentations.

POSTED BY: Phil Earnhardt
Posted 10 months ago

Theo Gray also explains this in this video on the Woflram R&D channel: https://www.youtube.com/watch?v=ZqawtrWwE0c

POSTED BY: Dave Middleton
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