browser-extension icon indicating copy to clipboard operation
browser-extension copied to clipboard

Customizing API base URL.

Open MeetAlpha opened this issue 2 years ago • 1 comments

I have API from other base URLs. How to cusomize the URL?

MeetAlpha avatar Oct 14 '23 07:10 MeetAlpha

Go to the file src/helpers/determineNextAction.ts and modify these parts:

  taskInstructions: string,
  previousActions: ParsedResponseSuccess[],
  simplifiedDOM: string,
  maxAttempts = 3,
  notifyError?: (error: string) => void
) {
  // ...

  const openai = new OpenAIApi(
    new Configuration({
      apiKey: customApiKey, // Use the custom API key
      basePath: customApiBaseUrl, // Use the custom API endpoint
    })
  );

  // ...
}

amnhdv avatar Nov 19 '23 03:11 amnhdv