How to integrate GPT-4 model hosted on Azure with a chattr package?

I am currently looking to integrate the OpenAI GPT-4 model into my application. Here are the details I have:

  • Endpoint:
  • Location/Region: yyyyyyyyyyyyyyyyyyyyyyyy
  • Key: *******************
  • Deployment Name: gpt-4o
  • Model Name: gpt-4o
  • Model Version: 2024-05-13

I want to integrate it with chattr. Could someone guide me on how to authenticate and make API requests to this endpoint?

I tried:

  path = "",
  model = "gpt-4o"

I saved the API under the .Renviron file.

Message: Resource not found! {error}Type:
Message: Resource not found
Error in `abort()`:
! `message` must be a character vector, not a <httr2_response> object.
Run `rlang::last_trace()` to see where the error occurred.