High-level function to call Azure OpenAI chat using tidyllm
azure_chat(
message,
use_cache = FALSE,
persist_cache = TRUE,
cache_path = NULL,
...
)A character string with the prompt or message.
Logical. If TRUE, reuse a cached response for identical
requests within the current R session. Default: FALSE.
Logical. If TRUE, persist cached responses to disk so
they can be reloaded in later sessions. Default: TRUE.
Optional character string path to the cache file used when
persist_cache = TRUE. Default: .cache_agrillm.rds in the current working
directory.
Additional arguments passed to azure_openai_chat.
The response from Azure OpenAI chat.
if (FALSE) { # \dontrun{
msg <- llm_message("Test prompt")
response <- azure_chat(msg)
print(response)
} # }