-
Notifications
You must be signed in to change notification settings - Fork 123
AI Completions
Will Fuqua edited this page Jun 14, 2026
·
3 revisions
C# REPL can suggest code completions using OpenAI. You bring your own API key, and usage is billed to your OpenAI account.
- Get an API key from OpenAI.
- Make it available to C# REPL, either:
- set the
OPENAI_API_KEYenvironment variable, or - pass
--openAIApiKey <key>at startup.
- set the
- Press Ctrl+Alt+Space at the caret to request a completion.
Set these at the command line or in your config file (see Configuring CSharpRepl):
-
--openAIApiKey <key>: your API key. -
--openAIModel <model>: the model to use. Default:gpt-4o. -
--openAIPrompt <prompt>: a system prompt prefixed to every submission. -
--openAIHistoryCount <count>: how many previous REPL entries to send as context. Default:5.