Gemini Connector
Integrate Google's Gemini models into your Logic Bee hooks.
Setup
// logic-bee.config.ts
export default {
connectors: {
gemini: {
apiKey: process.env.GEMINI_API_KEY,
model: 'gemini-2.5-pro',
},
},
};
Usage
@LogicHook({
event: 'classify-ticket',
collection: 'ai',
})
export class ClassifyTicketHook {
async run(context) {
const { subject, body } = context.body;
const response = await context.connectors.gemini.generate({
prompt: `Classify this support ticket:\nSubject: ${subject}\nBody: ${body}`,
responseSchema: { category: 'string', priority: 'string' },
});
return response;
}
}
Configuration Options
| Option | Type | Description |
|---|---|---|
apiKey | string | Your Google AI API key |
model | string | Model to use (default: gemini-2.5-pro) |
temperature | number | Sampling temperature (0–2) |
responseSchema | object | Optional structured output schema |