获取 GPT-4 响应
get_gpt4_response.Rd该函数通过 ChatAnywhere API 发送请求并获取 GPT-4 模型的响应。
Usage
get_gpt4_response(
  user_prompt = NULL,
  system_prompt = "You are a helpful assistant.",
  model = "gpt-4o-mini",
  api_key = Sys.getenv("CHATANYWHERE_API_KEY"),
  base_url = "https://api.chatanywhere.tech/v1",
  output_format = "json_object"
)Examples
if (FALSE) { # \dontrun{
response <- get_gpt4_response("你好,请介绍一下自己。")
print(response)
} # }