Video není dostupné.
OmlouvĂĄme se.

ChatGPT in RStudio with gptstudio - Better than GitHub Copilot?

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 18. 08. 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

Komentáƙe • 35

  • @AntoinSts
    @AntoinSts Pƙed měsĂ­cem

    Magnifique đŸ€©đŸ€©

  • @caty863
    @caty863 Pƙed 11 měsĂ­ci +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?

  • @robertberry4747
    @robertberry4747 Pƙed 10 měsĂ­ci +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).

  • @omerdizmen7889
    @omerdizmen7889 Pƙed 10 měsĂ­ci +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 Pƙed 18 dny

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

  • @aminroshani
    @aminroshani Pƙed rokem +1

    It was great. Thank you

  • @user-ds6mu2oh6d
    @user-ds6mu2oh6d Pƙed 10 měsĂ­ci +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.

  • @nutthaponrathie7145
    @nutthaponrathie7145 Pƙed rokem +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 Pƙed rokem

      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  Pƙed rokem

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

    • @HilianoMop
      @HilianoMop Pƙed 11 měsĂ­ci

      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 Pƙed 5 měsĂ­ci

      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

  • @IgnacioAguilarToledo
    @IgnacioAguilarToledo Pƙed 6 měsĂ­ci

    Awesome!

  • @mryoda
    @mryoda Pƙed 9 měsĂ­ci +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 Pƙed 9 měsĂ­ci

      Same here

  • @bornijp449
    @bornijp449 Pƙed 9 měsĂ­ci +1

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

  • @patolobos8266
    @patolobos8266 Pƙed rokem +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  Pƙed rokem +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.

  • @DaniloAssisPereira_IBNeuro
    @DaniloAssisPereira_IBNeuro Pƙed 7 měsĂ­ci

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

  • @YoungMoneyInvestments
    @YoungMoneyInvestments Pƙed 10 měsĂ­ci

    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.

  • @kennethgottfredsen767
    @kennethgottfredsen767 Pƙed 9 měsĂ­ci

    Doesn't work for me for some strange reason.

  • @joaquincarrascosa91
    @joaquincarrascosa91 Pƙed rokem

    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  Pƙed rokem

      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 Pƙed rokem +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).

  • @mateuspereira2794
    @mateuspereira2794 Pƙed rokem +1

    Is it posssible to use Free Chat GPT?

    • @james-h-wade
      @james-h-wade  Pƙed rokem +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 Pƙed 9 měsĂ­ci

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

  • @SergeiDumnov
    @SergeiDumnov Pƙed rokem

    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  Pƙed rokem

      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 Pƙed rokem

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

  • @cryptofile4002
    @cryptofile4002 Pƙed 4 měsĂ­ci

    does this work in RStudio locally?

  • @RobJ-m6i
    @RobJ-m6i Pƙed měsĂ­cem

    Unfortunately useless, no answer from the chat window

    • @k5555-b4f
      @k5555-b4f Pƙed 18 hodinami

      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