codestral is an R package that provides an RStudio addin for interacting with Mistral AI models using their API. It supports both Fill-in-the-Middle (FIM) code completion and chat functionality.
- Fill-in-the-Middle (FIM): Get code completion suggestions based on context
- Chat functionality: Interact with Codestral and Codestral Mamba models
- File inclusion: Easily include file contents in your prompts
- Package-aware: Automatically detects R package environments
You can install the development version from GitHub:
# install.packages("pak")
pak::pak("urbs-dev/codestral")For detailed usage instructions and examples, please refer to the codestral-introduction vignette.
- Get your API keys from Mistral AI Platform
- Initialize the package:
library(codestral)
codestral_init(mistral_apikey = "your-api-key-here", codestral_apikey = "your_codestral-api-key-here")- Use the RStudio addin "Codestral code completion" to interact with the models
library(codestral)
vignette("codestral-introduction")This package is licensed under the MIT License. See LICENSE for details.