Back to Home
pwnies-peru icon

ai-api

by pwnies-peru

Overview

An AI-powered e-commerce sales agent that uses product search tools to assist users with queries, recommendations, and purchase guidance.

Installation

Run Command
docker-compose up -d

Environment Variables

  • AI_GATEWAY_API_KEY
  • TYPESENSE_HOST
  • TYPESENSE_PORT
  • TYPESENSE_PROTOCOL
  • TYPESENSE_API_KEY

Security Notes

The `docker-compose.yml` file explicitly sets the Typesense API key to 'xyz' (and this is the default in `typesense_service.py` if not overridden by an environment variable). This hardcoded default API key is a severe security vulnerability, especially if the Typesense instance is exposed externally. Additionally, the FastAPI application uses `CORSMiddleware` with `allow_origins=["*"]`, which permits cross-origin requests from any domain, posing a potential security risk in a production environment by allowing unauthorized access if not properly secured otherwise. The direct passing of AI-generated arguments to internal functions, while currently constrained by simple types, is a pattern to watch for in more complex scenarios.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassHigh
Avg Tokens1500
Stars0
Forks0
Last Update2025-11-30

Tags

AI AgentE-commerceFastAPITypesenseFunction Calling