Hello,
I'm working on a sas macro that calls in ChatGPT into a SAS enviroment. I'm using this code whcih works successfully
data _null_; file in; put "{"; put '"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content"'}']'; put "}"; run;
/* Reference that file as IN= parm in PROC HTTP POST */ filename resp "%sysfunc(getoption(WORK))/echo.json"; /* Send the request and payload */ proc http method = "POST" url = "https://api.openai.com/v1/chat/completions" ct = "application/json" in = in out = resp; headers "Authorization" = "Bearer &api_key."; run;
My question is how do I alter this so I can explore some of the beta plug-ins that were introduced?. I do have a chatgpt 4 subscription so this is not an issue. is it better to create a separate macro for plug in specific requests as it would be a separate url or can it be altered within a single macro call?
I guess what I'm trying to ascertain is can PROC HTTP be used to bring in plug ins associated with applications such as ChatGPT? Such as PDF Reader?
No. Proc http can get data from websites
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.