Skip to content

AIProxy updates.

Latest
Compare
Choose a tag to compare
@jamesrochabrun jamesrochabrun released this 26 Jun 22:04
· 4 commits to main since this release
6bc5fe0
  • The factory method OpenAIServiceFactory.ollama has been changed to OpenAIServiceFactory.service, where you specify the url of the service that is OpenAI-API compatible. To specify the URL and api key (for Bearer API authentication), use:
OpenAIServiceFactory.service(apiKey: "YOUR_API_KEY", baseURL: "http:https://<DOMAIN>:<PORT>")
  • The AIProxy integration now uses certificate pinning to prevent threat actors from snooping on your traffic. There are no changes to your client code necessary to take advantage of this security improvement

  • The AIProxy integration has a changed method for hiding the DeviceCheck bypass token. This token is only intended to be used on iOS simulators, and the previous method of hiding was too easy to leak into production builds of the app. Please change your integration code from:

#if DEBUG && targetEnvironment(simulator)
	OpenAIServiceFactory.service(
		aiproxyPartialKey: "hardcode-partial-key-here",
		aiproxyDeviceCheckBypass: "hardcode-device-check-bypass-here"
	)
#else
	OpenAIServiceFactory.service(aiproxyPartialKey: "hardcode-partial-key-here")
#endif

To this:

OpenAIServiceFactory.service(
   aiproxyPartialKey: "hardcode-partial-key-here"
)

And use the method described in the README for adding the bypass token as an env variable to your Xcode project.