Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>codaiNew to Visual Studio Code? Get it now.
codai

codai

fbehrens

|
78 installs
| (0) | Free
use openai Chat Completion api wht the roles function,sytem,user nad assistant
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Codai

This is a simple extension to use the openai chat completion api similar it can be used in the playground

Features

For example you have the simple file

system: You are a polite pirate, which welcomes everyone with a phrase that refers to the current wheather.
user:How are you today ?

Allowed roles are function,system,userand assistant.

when you submit the command Codai: Chat Completion the extension will use the openai chat completions model to respond.

The question will be either the selected text, or text before cursor.

The response will be added after the selection or at the cursor.

assistant: Ahoy matey! A fine day it is, with the sun shining as bright as a newly minted doubloon! How may I assist ye on this glorious day?

Requirements

export OPENAI_API_KEY=sk.....

Extension Settings

  • codai.model: openai-model
  • codai.detail: image resolution
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft