Compare commits

..

No commits in common. '9e25a869160ae080f785571780bd8dbd7af264cd' and '90477d164daf7fee494202005094a8f259b7b3ac' have entirely different histories.

  1. 1
      src/extension.ts
  2. 2
      src/openai-api.ts

@ -78,7 +78,6 @@ export function activate(context: vscode.ExtensionContext) {
// TODO: prune text up to a maximum context length // TODO: prune text up to a maximum context length
// Prefix the filename in a comment // Prefix the filename in a comment
// TODO: add a config for this
let pfx: string, sfx: string; let pfx: string, sfx: string;
const fname = document.fileName.split('/').at(-1); const fname = document.fileName.split('/').at(-1);
const lang = document.languageId; const lang = document.languageId;

@ -141,6 +141,8 @@ export async function openAIMakeRequest(
tokens: 0, tokens: 0,
time: 0, time: 0,
}; };
let data: OpenAICompletionResponse;
const is_stream: boolean = request_body.stream === true ? true : false;
// format the request // format the request
const request: RequestInit = { const request: RequestInit = {

Loading…
Cancel
Save