A minimal R wrapper for using ChatDMDI in RStudio, based on the ellmer package.
Install from GitHub:
install.packages("devtools")
devtools::install_github("Jacobzwj/chatdmdi")You can choose one of the following model names for the model parameter:
- gpt-4o-image-vip
- o1
- gpt-4.1
- gpt-4o
- gpt-4o-mini
- claude-3-7-sonnet-20250219
- claude-3-5-haiku-20241022
- grok-3
- grok-3-reason
- deepseek-r1
- deepseek-v3
- gemini-2.0-flash
library(chatdmdi)
# Choose the model name and API key
chatdmdi(
model = "gpt-4o-mini",
api_key ="sk-XXXXXXXXX", #your api_key from ChatDMDI website
)By default the function starts a background process and opens the UI at http://127.0.0.1:8765. If you're in RStudio, it opens in the Viewer pane.
- restart viewer: close the Viewer and call
chatdmdi()again with the same model to reopen the existing session and preserve messages. - change model: change the model name and call
chatdmdi()to start a new session with the new model; previous history is cleared.
MIT