AI Assistant¶
OCI GenAI-powered drone advisor with ATP conversation history and product grounding.
How It Works¶
- User sends message via
/api/shop/assistant/query - App fetches relevant products from ATP (filtered by
product_focus) - Products converted to grounding documents
- Message + documents sent to OCI GenAI (or local fallback)
- Response stored in ATP (
assistant_messagestable) - Conversation history maintained per
session_id
Configuration¶
OCI_GENAI_ENDPOINT="https://inference.generativeai.eu-frankfurt-1.oci.oraclecloud.com"
OCI_GENAI_MODEL_ID="cohere.command-r-plus"
OCI_COMPARTMENT_ID="<compartment-ocid>"
Falls back to local product-matching logic if GenAI is not configured.
API¶
POST /api/shop/assistant/query
{
"message": "Which drone is best for aerial photography?",
"session_id": "optional-session-id",
"product_focus": "camera",
"customer_email": "optional@example.com"
}
Observability¶
- Span:
shop.assistant.query+shop.assistant.genai - Attributes:
assistant.provider,assistant.model_id,assistant.documents_grounded - Metric:
shop.business.assistant.queries