This tutorial is primarily for users who have purchased the GeekAI Plus source code. The Plus version includes License verification logic. Since the source code is synchronized, there is no separate version without License verification. After syncing to the latest source code, you need to manually remove the License verification logic; otherwise, you may encounter errors like "Not in the whitelist" when using third-party API keys.
Skipping License verification is very simple. Just modify two functions in the api/service/license_service.go
file:
- When fetching the License, do not actually fetch it; instead, directly return a random License object.
- When verifying the whitelist, directly return nil to pass the verification by default.
First, locate the fetchLicense()
function:
func (s *LicenseService) fetchLicense() (*types.License, error)
Modify it as follows:
func (s *LicenseService) fetchLicense() (*types.License, error) {
return &types.License{
Key: "geekai",
MachineId: "geekai",
Configs: types.LicenseConfig{DeCopy: true, UserNum: 100000},
ExpiredAt: 0,
IsActive: true,
}, nil
}
Then, locate the IsValidApiURL()
function and modify it as follows:
func (s *LicenseService) IsValidApiURL(uri string) error {
return nil
}
Done! After restarting, you will no longer see error logs like "Failed to send activation request."