π Internal API Integration
Snapr relies on internal API calls to trigger remote AI agents hosted on Modal and OpenAI. These are not public endpoints but are securely invoked within the application backend.
βοΈ Modal API (Internal)
Each agent is implemented as a Modal class and invoked using modal.Cls.from_name(...)
. For example:
1 2 |
|
π§ OpenAI API
OpenAI is used by two agents:
DealScannerAgent
: selects the top 5 deals from raw inputs, ensuring clear descriptions and explicit prices.RAGPriceAgent
: estimates product prices after retrieving similar items from ChromaDB to provide contextual grounding.
π Authentication
Access to external services requires the following environment variables, which should be defined in the .env
file.
OPENAI_API_KEY
MODAL_TOKEN_ID
MODAL_TOKEN_SECRET
Note
All API interactions are internal β there is no public REST or HTTP API exposed.