Alankar assistant

Settings

Chat uses round-robin across every enabled API key, alternating gemma-4-26b-a4b-it and gemma-4-31b-it per key (8 chat rotation slots from 4 keys). Embeddings always use gemini-embedding-2-preview (keys rotate for quota). If no keys are saved here, GEMINI_API_KEY in the environment is used as a single key.

Assistant & deployment

Testing or Production

Testing: webhook still runs and the AI reply is saved — you see it in the inbox; customers on Messenger get nothing back. Production: the same reply is sent to the customer on Messenger.

Testing: webhook still receives and stores messages, but outbound Messenger sends are skipped.

Your chosen secret. Enter the exact same value in Meta as the webhook Verify Token. If empty, MESSENGER_VERIFY_TOKEN from the environment is used.


Messenger webhook URL

In Meta Developer Console, set the callback URL below and paste the same verify token you saved above (or set MESSENGER_VERIFY_TOKEN in the environment if the field is empty).

Webhook URL: https://ai.sohag.com.bd/api/webhook/

Also set MESSENGER_PAGE_ACCESS_TOKEN (and optionally MESSENGER_APP_SECRET for signature verification).

Gemini API keys

Now using 4 key(s) from this app’s database (round-robin for chat + embed). Your Django process is not using GEMINI_API_KEY from .env while these enabled keys exist.

Google AI Studio dashboard: usage from this app is API traffic on your key, not the AI Studio web “chat” playground. Charts can lag; check the same Google account that created the key. If you use keys from two accounts, each account’s console only shows its own key’s usage.

Add multiple keys (e.g. different Google accounts) to spread free-tier limits. Each key uses these chat models in rotation: gemma-4-26b-a4b-it, gemma-4-31b-it.

Add key

Lower runs earlier in the rotation.

Product catalog

Upload product photos. Each image is embedded with the same model as user photos so similarity search is meaningful.

Add product image

Optional text stored with the product (shown to the model).