AI
interface in the packages/pieces/community/common/src/lib/ai/providers/your-ai-provider.ts
file.
AiProviders
enum in packages/pieces/community/common/src/lib/ai/providers/index.ts
file.
auth
property to the AiProvider
object.
The auth
property is an object that defines the authentication mechanism for your AI provider. It consists of two properties: name
and mapper
. The name
property specifies the name of the header that will be used to authenticate with your AI provider, and the mapper
property defines a function that maps the value of the header to the format that your AI provider expects.
Here’s an example of how to define the authentication header for a bearer token: