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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.