Group Abstract Group Abstract

Message Boards Message Boards

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

Posted 2 years 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 2 years 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

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 2 years 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 2 years 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 2 years 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 2 years 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
Posted 2 years 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

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
Posted 2 years ago
POSTED BY: Phil Earnhardt
Posted 2 years 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
Posted 2 years 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 2 years 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 2 years ago
POSTED BY: Yvan Abbe
Posted 2 years 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 2 years 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 2 years ago
POSTED BY: Ralph Brown
POSTED BY: Roger J Brown
Posted 2 years 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
Posted 2 years 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

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

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