#823 - Copilot setting

This commit is contained in:
Elio Struyf
2024-06-27 14:39:22 +02:00
parent 38d48b9fa7
commit bd1fc32f1c
5 changed files with 17 additions and 5 deletions

View File

@@ -2034,6 +2034,11 @@
"info",
"verbose"
]
},
"frontMatter.copilot.family": {
"type": "string",
"default": "gpt-3.5-turbo",
"markdownDescription": "%setting.frontMatter.copilot.family.markdownDescription%"
}
}
},

View File

@@ -279,5 +279,6 @@
"setting.frontMatter.taxonomy.contentTypes.items.properties.isSubContent.description": "Specify if the content type is sub content.",
"setting.frontMatter.git.disableOnBranches.markdownDescription": "Specify the branches on which you want to disable the Git actions. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.git.disableonbranches) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.git.disableonbranches%22%5D)",
"setting.frontMatter.git.requiresCommitMessage.markdownDescription": "Specify if you want to require a commit message when publishing your changes for a specified branch. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.git.requirescommitmessage) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.git.requirescommitmessage%22%5D)"
"setting.frontMatter.git.requiresCommitMessage.markdownDescription": "Specify if you want to require a commit message when publishing your changes for a specified branch. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.git.requirescommitmessage) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.git.requirescommitmessage%22%5D)",
"setting.frontMatter.copilot.family.markdownDescription": "Specify the LLM family of the Copilot you want to use. [Docs](https://frontmatter.codes/docs/settings/overview#frontmatter.copilot.family) - [View in VS Code](command:simpleBrowser.show?%5B%22https://frontmatter.codes/docs/settings/overview%23frontmatter.copilot.family%22%5D)"
}

View File

@@ -115,6 +115,8 @@ export const SETTING_SNIPPETS_WRAPPER = 'snippets.wrapper.enabled';
export const SETTING_WEBSITE_URL = 'website.host';
export const SETTING_COPILOT_FAMILY = 'copilot.family';
export const SETTING_LOGGING = 'logging';
/**

View File

@@ -2321,7 +2321,7 @@ export enum LocalizationKey {
*/
helpersQuestionsContentTitleAiInputQuickPickAiSeparator = 'helpers.questions.contentTitle.aiInput.quickPick.ai.separator',
/**
* GitHub Copilot generated title
* GitHub Copilot suggestions
*/
helpersQuestionsContentTitleAiInputQuickPickCopilotSeparator = 'helpers.questions.contentTitle.aiInput.quickPick.copilot.separator',
/**

View File

@@ -7,7 +7,11 @@ import {
version as VscodeVersion
} from 'vscode';
import { Logger, Settings, TaxonomyHelper } from '../helpers';
import { SETTING_SEO_DESCRIPTION_LENGTH, SETTING_SEO_TITLE_LENGTH } from '../constants';
import {
SETTING_COPILOT_FAMILY,
SETTING_SEO_DESCRIPTION_LENGTH,
SETTING_SEO_TITLE_LENGTH
} from '../constants';
import { TagType } from '../panelWebView/TagType';
import { TaxonomyType } from '../models';
@@ -198,8 +202,8 @@ export class Copilot {
*/
private static async getModel() {
const [model] = await lm.selectChatModels({
vendor: 'copilot'
// family: 'gpt-4'
vendor: 'copilot',
family: Settings.get<string>(SETTING_COPILOT_FAMILY) || 'gpt-3.5-turbo'
});
return model;