1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

はじめての OpenAI Codex #2 ― VSCodeで“Tab補完”を体験

Posted at

1. GitHub Copilot をインストール

  1. VSCode 左の拡張機能アイコンをクリック
  2. GitHub Copilot を検索 → Install
  3. GitHub アカウントでサインイン(30 日無料トライアル可)

💡 Copilot は Codex 系モデルを VSCode に統合した“リアルタイム補完ツール”です。

2. 3 行書くだけでアルゴリズム完成?!

# ソートしたいリスト
nums = [5, 3, 8, 1]

# ▼ここで Tab を押す
  • Copilot が nums.sort() を灰色で提案
  • Tab で確定 → 一瞬でバブルソート!!

3. コメント駆動開発の威力

# 与えられた文字列が回文か判定する関数
  • コメントを書いた瞬間、10 行ほどの関数を全自動生成
  • テスト入力も提案されることがある

4. 補完精度を高めるコツ

コツ Why
コメントは英語がベター 学習データ量が段違い
変数名を具体的に data_list より age_list
温度設定は 0〜0.1 拡張設定 → panelTemperature

5. ショートカット早見表

操作 キー
提案受け入れ Tab
次の候補 Alt + ]
前の候補 Alt + [
提案を非表示 Esc

6. よくある疑問

Q. 英語コメント必須?
日本語でも動きますが、専門用語は英語にした方が文脈精度が高いです。

Q. オンライン必須?
はい。現状 Copilot はクラウド推論のみです。

7. 次回予告

Day 3:プロンプトから “丸ごとファイル” を自動生成
CRUD API を 1 プロンプトで量産してみます!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?