Skip to content

Instantly share code, notes, and snippets.

@Apurer
Created May 11, 2023 09:38
Show Gist options
  • Save Apurer/de8ac0de607ea92e2fc725a0fea9f48c to your computer and use it in GitHub Desktop.
Save Apurer/de8ac0de607ea92e2fc725a0fea9f48c to your computer and use it in GitHub Desktop.
async provideInlineCompletionItems(document, position, context, token) {
console.log('provideInlineCompletionItems triggered');
// Read the configuration settings
const config = vscode.workspace.getConfiguration('codeHelper');
const maxToGenerate = config.get<number>('maxToGenerate') || 128;
const temperature = config.get<number>('temperature') || 0.6;
const modelName = config.get<string>('modelName') || 'default_model';
// ...
// Update the payload creation to include the configuration settings
const payload = createPayload(
document,
position,
fileExt,
maxToGenerate,
temperature,
modelName
);
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment