Boost & Optimize Onedollarai.com

Job ID: 38969967

Budget: $750 – $1,500 SGD

### Website and Features Overview

---

#### 1. Website Performance
- **Issue**: Website loads very slowly.
- [onedollarai.com](http://onedollarai.com)

---

#### 2. Toggle/Dropdown to Change Settings
- **Language Versions**:
- Chinese and Japanese versions of the website.
- **Reference**: See Figma (Draft 5)
Link: [https://www.figma.com/design/smMazhuYcVyvhfvZKW5GgF/OneDollarAI?node-id=0-1&t=RtckJdZUQZBKV1LZ-1](https://www.figma.com/design/smMazhuYcVyvhfvZKW5GgF/OneDollarAI?node-id=0-1&t=RtckJdZUQZBKV1LZ-1)

- **Geolocation-Based Language Settings**:
- Automatically changes language based on user location.
- **Manual Override**: Language can also be changed manually via a dropdown at the top-right corner of the screen.

---

#### 3. Payments
- **Setup Payment Methods**:
- Supported Methods:
- Alipay
- WeChat Pay
- PayPay
- HitPay (sample code provided)

- **Discount Setup**:
- **60% Discount for Inviting a Friend**:
- Users can copy a referral link to their clipboard (for both phone and desktop).
- Conditions for Discount:
- Friend’s account must be either:
1. Not yet created, or
2. Created less than 24 hours ago and after the referrer’s account.
- Discount applies to the friend’s account.

- **Price Calculation**:
- Use price-per-prompt data from the JSON file:
`oneDollarAI\BE\BE_cost_data.json`
- Regular price is 5x the cost listed in the JSON file.

- **Record Account Spending**:
- Use the provided function to track tokens used and spending.

- **Fee Calculation**:
- Cost calculated using the function:
`oneDollarAI\BE\chatApi\management\commands\t001c_calculate_cost.py`
- Input includes all messages (current and previous) for context.
- Final fee = `cost * 5`.
- Deduct from the user’s account balance.

---

#### 4. Connect Additional Chat Models
- **OpenAI Chat Models**:
- Free: ChatGPT 4o Mini
- Paid: ChatGPT 4o, o1

- **Other Chat Models**:
Setup with AIMLAPI (API available in `chatAPI/management/commands/chatModels`):
- **Gemini**:
- Gemini 1.5 Flash (Free)
- Gemini 1.5 Pro (Paid)
- Gemini 2.0 Flash (Paid)

- **Llama 3**:
- Llama 3.2 3B Instruct Turbo (Free)
- Llama 3.1 (405B) Instruct Turbo (Paid)

- **References**:
- Pricing: [https://aimlapi.com/ai-ml-api-pricing](https://aimlapi.com/ai-ml-api-pricing)
- Documentation: [https://docs.aimlapi.com/api-overview/model-database/text-models](https://docs.aimlapi.com/api-overview/model-database/text-models)

---

#### 5. Django Account Login
- **Login Requirements**:
- Login is mandatory for accessing paid models.
- Features include email login and password recovery.

---

#### 6. Image Support
- **Feature Addition**:
- Enable sending images to the AI chat.
- Reference:
[https://platform.openai.com/docs/guides/vision](https://platform.openai.com/docs/guides/vision)

---

#### 7. Chat and Document Search
- **Search Features**:
- Search through chat titles and messages.
- Allow document uploads and searching (for users who have either:
- Topped up $10 or
- Spent $2 previously).

- **Document Uploads**:
- Enable drag-and-drop functionality.
- Convert uploaded files to Markdown for improved AI compatibility.
- Include a button to switch between chat view and document search.
-Put documents as context for AI to search through.

---

#### 8. Fix Delete Button
- **Issue**: Current delete button does not remove chats completely; they remain saved in local storage.
- **Fix Required**: Ensure complete deletion of chats from local storage.

---