You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitprompt({model: "gpt-4o",token: process.env.TOKEN,system: "You are a helpful assistant.",messages: [{role: "user",content: "What is the capital of France?"},{role: "assistant",content: "The capital of France is Paris."},{role: "user",content: [[{type: "text",text: "What about this country?"},{type: "image_url",image_url: urlToImageOfFlagOfSpain,},],],},],// GitHub recommends using your GitHub username, the name of your application// https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28#user-agentuserAgent: "gr2m/my-app v1.2.3",// set an alternative chat completions endpointendpoint: "https://models.inference.ai.azure.com/chat/completions",// compare https://platform.openai.com/docs/guides/function-calling/configuring-function-calling-behavior-using-the-tool_choice-parametertoolChoice: "auto",tools: [{type: "function",function: {name: "get_weather",strict: true,parameters: {type: "object",properties: {location: {type: "string"},unit: {type: "string",enum: ["c","f"]},},required: ["location","unit"],additionalProperties: False,},},},],// configuration related to the request transport layerrequest: {// for mocking, proxying, client certificates, etc.fetch: myCustomFetch,// hook into request life cycle for complex authentication strategies, retries, throttling, etc// compare options.request.hook from https://github.com/octokit/request.jshook: myCustomHook,// Use an `AbortController` instance to cancel a requestsignal: myAbortController.signal,},});
Out of the documented arguments, only model, token, and request.fetch is implemented as of September 1st.
The text was updated successfully, but these errors were encountered:
As of September 1st, we document the following usage example for
prompt()
:(see the latest spec at https://github.com/copilot-extensions/preview-sdk.js#promptmessage-options)
Out of the documented arguments, only
model
,token
, andrequest.fetch
is implemented as of September 1st.The text was updated successfully, but these errors were encountered: