Cursor でカスタムモデルを使用する方法
このガイドでは、Cursor でカスタム AI モデルを設定および使用する方法について説明します。
サポートされているモデルタイプ
OpenAI 互換モデル
- Anthropic Claude
- DeepSeek
- Mistral
- ローカル LLM
カスタム API エンドポイント
- セルフホストモデル
- クラウド API サービス
- カスタム実装
基本設定
モデル設定の手順
- 設定ファイルを開く
- モデル設定を追加する
{
"model": {
"name": "custom-model",
"apiKey": "your-api-key",
"baseUrl": "https://api.example.com",
"contextLength": 8192,
"temperature": 0.7
}
}
モデルの統合
OpenAI 互換モデル
{
"model": {
"type": "openai",
"name": "gpt-4",
"apiKey": "your-openai-key",
"organization": "your-org-id"
}
}
Anthropic Claude
{
"model": {
"type": "anthropic",
"name": "claude-2",
"apiKey": "your-anthropic-key",
"maxTokens": 4096
}
}
ローカルモデル
{
"model": {
"type": "local",
"path": "/path/to/model",
"contextLength": 2048,
"temperature": 0.8
}
}
詳細設定
モデルの動作設定
{
"model": {
"temperature": 0.7,
"topP": 0.9,
"frequencyPenalty": 0.0,
"presencePenalty": 0.0,
"stopSequences": ["```", "###"]
}
}