TaxyAI / browser-extension

Automate your browser with GPT-4
MIT License
1.01k stars 395 forks source link

Customizing API base URL. #54

Open MeetAlpha opened 1 year ago

MeetAlpha commented 1 year ago

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

amnhdv commented 1 year ago

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
    })
  );

  // ...
}