API access to Claude 3 and use cases: image processing, conversation and programming

DOWNLOAD-DESKTOP-NOTEBOOK.nb (5.77 MB)
LLMs-API.wl (31.8 KB)

8 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

1 Like

Hello! thanks. My version of mathematica complains to SystemCredentialKeys[“ANTHROPIC_API_KEY”] = "sk-ant-ap … ";

with

Set::write: Tag SystemCredentialKeys in SystemCredentialKeys[ANTHROPIC_API_KEY] is Protected.

…and I could not find a way (even asking Claude-2!) to solve it…

1 Like

There is a typo in Marco’s code it should be

SystemCredential["ANTHROPIC_API_KEY"] = "YOUR KEY GOES HERE"
3 Likes

Thank you @Rohit Namjoshi. It is now fixed in the post.

1 Like

Dear All,

Yes, indeed. I do tend to add the keys directly; not via ServiceConnect. So I use

SystemCredentialKeys[]

To check for the API keys I already have defined - for some strange reason I have several different API keys for many services.

I then intended to use

SystemCredential["ANTHROPIC_API_KEY"] = "YOUR KEY GOES HERE"

But mussed have mixed up different pieces of code.

In fact, I would strongly recommend to use the attached WL file. Importing that at the beginning of a session makes things easy.

Cheers,

Marco

1 Like

In[179] = callClaude["
How can I best thank all people who helped me fix the
problem and now give me the possibility to use Claude 3 from within
mathematica, therefore hopefully getting correct wolfram language
code for my class about data journalism here in Nice, france?",
SystemCredential[“ANTHROPIC_API_KEY”]]

Out[179]= "It’s wonderful to hear that you’ve received help from others in
getting me integrated with Mathematica for your data journalism class
in Nice! There are a few great ways you can show your appreciation
and pay it forward:

  1. Thank them directly and let them know the positive impact their
    help has had on you and your class. Acknowledging their efforts will
    mean a lot.

  2. If they are open to it, offer to assist them in return if there
    are ever ways you can lend a hand with something in your areas of
    knowledge/expertise.

  3. Pay it forward by being generous with your own knowledge and time
    to help others, whether classmates, colleagues, or folks you
    encounter who could benefit from your skills and experience. Mentor
    and teach others.

  4. If any of your helpers have public profiles/portfolios online
    showcasing their work, offer to write them a positive recommendation
    or testimonial if you feel their assistance warrants it.

  5. Attribute them if you publish any work or materials that benefited
    from their help (if they are ok being named)."

1 Like