ChatGPT in RStudio with gptstudio - Better than GitHub Copilot?

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • In this video, I demonstrate how to use large language models like GPT-4 and GPT-3.5-Turbo (aka ChatGPT) to supercharge your R programming workflow. The new R package gptstudio makes it easy to integrate these AI assistants directly inside RStudio for code suggestions, documentation, and more. I show examples of generating plots and code snippets on demand using natural language prompts. Whether you're looking to automate repetitive tasks or get unstuck on complex coding challenges, this package unlocks the power of LLMs for R developers of all skill levels.
    💻 {gptstudio} GitHub github.com/mic...
    ☁️ Posit Cloud posit.cloud
    🤖 {usethis} usethis.r-lib....
    #rstats #rstudio #ai #githubcopilot #openai #gpt3 #gpt4 #huggingface #anthropic #claude #llms #chatbot #shiny #ide #code #programming #copilot

Комментарии • 35

  • @AntoinSts
    @AntoinSts Месяц назад

    Magnifique 🤩🤩

  • @caty863
    @caty863 11 месяцев назад +2

    You didn't answer the question about whether this RStudio's LLMs integration interface is better than GitHub Copilot.
    Copilot gives you suggestions right in the code editor. No need for copy pasting. It therefore feels more natural and the workflow is much less complex. What do you say?

  • @omerdizmen7889
    @omerdizmen7889 11 месяцев назад +6

    hi, hope yo are well, I got up to the stage where gpt is on my viewer section but whenever i write something such as who made ggplot2 there is no response, can you help ?

    • @jeroenham8897
      @jeroenham8897 20 дней назад

      I have the same issue. Did you get it resolved?

  • @robertberry4747
    @robertberry4747 10 месяцев назад +1

    Followed this but didn't work for me unfortunately - no response from prompt and no option for ChatGPT-4 (which I have a subscription for).

  • @nutthaponrathie7145
    @nutthaponrathie7145 Год назад +4

    I have followed all the steps until 5:03 but when I write prompt and send, there is no response. Can you suggest?

    • @nutthaponrathie7145
      @nutthaponrathie7145 Год назад

      The background jobs show:
      Background session status: 200, done callr-rs-result-8622e7c5698, NULL, ,
      Deleting chat history from this session. , and list(message = "in callr
      subprocess.", srcref = NULL, status = 0, stdout = "", stderr = "Deleting chat
      history from this session.
      ", parent_trace = list(parent = c(12, 13, 15, 15,
      17, 18, 19, 19, 20, 21, 0, 23), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
      TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), namespace = c(NA, NA, "gptstudio", "base",
      "gptstudio", "gptstudio", "gptstudio", "gptstudio", "base", "base", "base",
      NA), scope = c("", "", ":::", "::", "::", "::", ":::", "::", "::", "::", "::",
      "global" ), srcref = list(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
      NULL, NULL, NULL), procsrcref = list(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
      NULL, NULL, NULL, NULL, NULL), pid = c(2165, 2165, 2165, 2165, 2165, 2165,
      2165, 2165, 2165, 2165, 2165, 2165), call =
      list("gptstudio::gptstudio_job(skeleton, skill, style, task, custom_prompt)",
      c("gptstudio_skeleton_build(skeleton, skill, style, task, custom_prompt) %>% ",
      " gptstudio_request_perform() %>% gptstudio_response_process() %>% "),
      "save_skeleton(.)", "saveRDS(skeleton, skeleton_file())",
      "gptstudio_response_process(.)", "gptstudio_request_perform(.)",
      "gptstudio_request_perform.gptstudio_request_openai(.)",
      "stream_chat_completion(prompt = messages, model = model)",
      "readRDS(streaming_file())", "gzfile(file, \"rb\")",
      c(".handleSimpleError(function (e) ", "{"), "h(simpleError(msg, call))")), call
      = NULL, procsrcref = NULL, parent = list(message = "cannot open the
      connection", call = "gzfile(file, \"rb\")", srcref = NULL, procsrcref = NULL))

    • @james-h-wade
      @james-h-wade  Год назад

      Hmm… have you added payment information when creating your OpenAI account?
      Thanks for trying it out!

    • @HilianoMop
      @HilianoMop 11 месяцев назад

      it seems this problem happens if you are using Windows. You may try to run a previous version with the code: remotes::install_version("gptstudio", version = "0.2.0")

    • @AlbaRStudio23
      @AlbaRStudio23 6 месяцев назад

      I try without the payment info. cuz i wanted to know how it works b4. but its not possible to run like that right?@@james-h-wade

  • @mryoda
    @mryoda 9 месяцев назад +1

    mine doesn't load anything. I do have the "hello and welcome to R" in viewer, but once i type anything in the chat doesn't do anything.

    • @hen3vz
      @hen3vz 9 месяцев назад

      Same here

  • @user-ds6mu2oh6d
    @user-ds6mu2oh6d 10 месяцев назад +1

    My plan is ChatGPT Plus, the paid gpt4 version. RStudio won't recognize my API Key and I do not see gpt4 as an option.

  • @IgnacioAguilarToledo
    @IgnacioAguilarToledo 6 месяцев назад

    Awesome!

  • @aminroshani
    @aminroshani Год назад +1

    It was great. Thank you

  • @patolobos8266
    @patolobos8266 Год назад +1

    I've tried to run it locally in Windows 10, did not work. It does start replying and then stops, took a look at the background job and got "Warning: Error in readRDS: error reading from connection"
    "h(simpleError(msg, call))")), call = NULL, procsrcref = NULL, parent =
    list(message = "cannot open the connection", call = "gzfile(file, mode)",
    srcref = NULL, procsrcref = NULL))
    Hope this get even more integrated and supported by Posit, one of the showstoppers in using Rstudio in Sagemaker is that cannot compete with VSCode copilot. These new plugin helps to shorten the gap greatly.

    • @james-h-wade
      @james-h-wade  Год назад +1

      Thanks for letting me know. As a temporary fix, you may be able to run streaming set to false. I'll see what we can do with the next release to make that more stable on Windows.

  • @YoungMoneyInvestments
    @YoungMoneyInvestments 10 месяцев назад

    How do you get around the character count with Chat GPT? I've been trying to feed it some of my C# code but because there's so many lines, I can't get around the 4096 character limit. I've tried chunking it up but I would need 7-8 chunks and it's like GPT forgets what I was asking it to do after so many chunks of code. I've also read I could put it on GitHub but I don't want to open source my code like that just to feed GPT the link. Is there anything else I'm not aware of? Thanks in advance.

  • @joaquincarrascosa91
    @joaquincarrascosa91 Год назад

    Seems great! I will try it out.
    Is it possible to run a long list of prompts (from a spreadsheet for example) ? and to save the answer to each prompt in the spreadsheet?

    • @james-h-wade
      @james-h-wade  Год назад

      I'd love to hear how it goes. As far as a list of prompts, that's not a feature we have right now. What do you have in mind for that?

    • @joaquincarrascosa91
      @joaquincarrascosa91 Год назад +1

      ​@@james-h-wade I have been using ChatGPT to code survey data (turn occupation text into a ISCO-08 Code).
      But its only worth it if i can do thousands in a reasonable ammount of time (i.e. 10k prompts).

  • @bornijp449
    @bornijp449 9 месяцев назад +1

    Even if my API was just produces, it does not work....

  • @DaniloAssisPereira_IBNeuro
    @DaniloAssisPereira_IBNeuro 7 месяцев назад

    Addins -> ChatGPT and this message "Connection refused". My OPENAI_API_KEY is correct. How to solve it, please? Thanks.

  • @kennethgottfredsen767
    @kennethgottfredsen767 9 месяцев назад

    Doesn't work for me for some strange reason.

  • @SergeiDumnov
    @SergeiDumnov Год назад

    Why I do not see the GPT 4 among the API options for me (I am in Sydney, and do have a paid subscription)? Thanks

    • @james-h-wade
      @james-h-wade  Год назад

      Do you see GPT-4 in the models listed on the OpenAI Playground (platform.openai.com/playground)? If you don't, OpenAI should be rolling out access soon. Thanks for trying it out!

    • @SNMS1114
      @SNMS1114 Год назад

      I couldnt see GPT-4 in the list of Rstudio in setting section aswell.@@james-h-wade

  • @mateuspereira2794
    @mateuspereira2794 Год назад +1

    Is it posssible to use Free Chat GPT?

    • @james-h-wade
      @james-h-wade  Год назад +2

      Which model are you talking about? You get a free credit with the OpenAI API and a lot of HuggingFace models are free if you want to use those.

    • @perevales
      @perevales 9 месяцев назад

      I have the free plan and it is not working. I get the error: OPENAI_API_KEY is not valid. What a pity!!

  • @cryptofile4002
    @cryptofile4002 4 месяца назад

    does this work in RStudio locally?

  • @RobJ-m6i
    @RobJ-m6i Месяц назад

    Unfortunately useless, no answer from the chat window

    • @k5555-b4f
      @k5555-b4f 3 дня назад

      it works - i had the same issue at first, add a value/dollar amount of >=5 on your billing - you can't just add a credit card (the free credit thing is prolly from a while ago) i also made sure to uncheck 'autorefill credit' or whatever it's called