Magics commands

Magics are special commands for the kernel that are not part of the C++ programming language.

There are defined with the symbol % for a line magic and %% for a cell magic.

Here are the magics available in xeus-cpp.

%%xassist

Leverage the large language models to assist in your development process. Currently supported models are Gemini, OpenAI, Ollama.

  • Save the api key (for OpenAI and Gemini)

%%xassist model --save-key
key
  • Save the model

  • Set the response url (for Ollama)

%%xassist model --set-url
key
%%xassist model --save-model
key
  • Use the model

%%xassist model
prompt
  • Reset model and clear chat history

%%xassist model --refresh
  • Examples

_images/gemini.png _images/ollama.png