@copilot-extensions/preview-sdk
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -50,5 +50,3 @@ import { request } from "@octokit/request"; | ||
export interface CreateConfirmationEventInterface { | ||
( | ||
options: CreateConfirmationEventOptions, | ||
): string; | ||
(options: CreateConfirmationEventOptions): string; | ||
} | ||
@@ -55,0 +53,0 @@ export interface CreateReferencesEventInterface { |
@@ -221,3 +221,3 @@ import { expectType } from "tsd"; | ||
request: { | ||
fetch: () => { }, | ||
fetch: () => {}, | ||
}, | ||
@@ -224,0 +224,0 @@ }); |
// @ts-check | ||
const DEFAULT_ENDPOINT = "https://api.githubcopilot.com/chat/completions"; | ||
const DEFAULT_MODEL = "gpt-4o"; | ||
/** @type {import('..').PromptInterface} */ | ||
function parsePromptArguments(userPrompt, promptOptions) { | ||
@@ -10,5 +12,4 @@ const { request: requestOptions, ...options } = | ||
const promptFetch = requestOptions?.fetch || fetch; | ||
const model = options.model || "gpt-4"; | ||
const endpoint = | ||
options.endpoint || "https://api.githubcopilot.com/chat/completions"; | ||
const model = options.model || DEFAULT_MODEL; | ||
const endpoint = options.endpoint || DEFAULT_ENDPOINT; | ||
@@ -62,3 +63,2 @@ const systemMessage = options.tools | ||
const body = await response.text(); | ||
console.log({ body }); | ||
@@ -65,0 +65,0 @@ throw Object.assign( |
@@ -8,3 +8,3 @@ { | ||
"type": "module", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"keywords": [ | ||
@@ -11,0 +11,0 @@ "ai", |
@@ -38,3 +38,3 @@ import { test, suite } from "node:test"; | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
}), | ||
@@ -156,3 +156,3 @@ }) | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
}), | ||
@@ -221,3 +221,3 @@ }) | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
}), | ||
@@ -279,3 +279,3 @@ }) | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
}), | ||
@@ -349,3 +349,3 @@ }) | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
toolsChoice: "auto", | ||
@@ -420,3 +420,3 @@ }), | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
}), | ||
@@ -462,3 +462,3 @@ }) | ||
], | ||
model: "gpt-4", | ||
model: "gpt-4o", | ||
toolsChoice: undefined, | ||
@@ -465,0 +465,0 @@ }, |
84653
1670