Closed fredsteamboat closed 2 months ago
Hi, what does chattr_test()
returns?
nothing
I restarted R and tested the code again and got this error:
Error in UseMethod("ch_test") : no applicable method for 'chtest' applied to an object of class "c('ch', 'ch_model')"
Ok, can you run this code in your console and let me know what it returns?
library(httr2)
Sys.setenv("OPENAI_API_KEY" = "sk-...")
request("https://api.openai.com/v1/models") %>%
req_auth_bearer_token(Sys.getenv("OPENAI_API_KEY")) %>%
req_perform()
should I insert my API key or just copy and paste your code?
library(httr2) Sys.setenv("OPENAI_API_KEY" = "sk-n......") request("https://api.openai.com/v1/models") %>%
- req_auth_bearer_token(Sys.getenv("OPENAI_API_KEY")) %>%
- req_perform()
GET https://api.openai.com/v1/models Status: 200 OK Content-Type: application/json Body: In memory (2572 bytes)
Ok, this means that it is an issue with calling the 4o model itself, I will have to look at that. But I won't be able until tomorrow. I will follow up with I have a fix for that
ok, thanks!
Morning, I figured it out. Before calling chattr_app()
, the token needs to be set like you did here:
Sys.setenv("OPENAI_API_KEY" = "sk-n......")
You have to see 3 Open AI models in the selection prompt, not just one (4o).
Related bug fix: df2c38c238f9c38cfd3ee0846ab498e1921b2175 gpt4o should not show up in the menu selection
Thanks
On Mon, Sep 2, 2024, 10:23 AM Edgar Ruiz @.***> wrote:
Related bug fix: df2c38c https://github.com/mlverse/chattr/commit/df2c38c238f9c38cfd3ee0846ab498e1921b2175 gpt4o should not show up in the menu selection
— Reply to this email directly, view it on GitHub https://github.com/mlverse/chattr/issues/121#issuecomment-2324871246, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2FPD7Q7UCHBPWZOLTGXIWDZURYFTAVCNFSM6AAAAABNPO4DG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRUHA3TCMRUGY . You are receiving this because you authored the thread.Message ID: @.***>
@edgararuiz I found that it was likely an issue with my API key. I don't know if others experienced the same issue, but the API key would not work until I added a payment method in OpenAPI. Once I added my CC#, I created a new key and it worked.
Great to hear!
I had the same issue but cc did not solve it.
I have installed the chattr package and add my api secret but each time I enter a promtp I get no response.
I'm on an Intel Mac using MacOS 14.6.1
I'm using the latest version of R and RStudio