| chat_openai | R Documentation |
Convenience wrapper for 'OpenAI' models.
chat_openai(prompt, model = "gpt-4o-mini", ...)
prompt |
Character. The user message to send. |
model |
Character. Model name (e.g., "gpt-4o", "claude-3-5-sonnet-latest", "llama3.2"). |
... |
Additional parameters passed to the API. |
The assistant's response as a character string, or a list when
history is in use. See chat for details.
## Not run:
chat_openai("Explain quantum computing")
chat_openai("Write a haiku", model = "gpt-4o")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.