Precise Laravel-OpenAI Backend Integration: PLEASE READ CAREFULLY

Заказчик: AI | Опубликовано: 01.04.2026
Бюджет: 250 $

Precise Laravel + OpenAI Backend Integration — Read Carefully Backend Developer (Laravel + OpenAI) — Existing System, Must Implement Precisely Description I already have a working frontend (Tampermonkey userscript) that intercepts ChatGPT messages and calls a backend endpoint. Do not apply unless you have experience with both: Laravel / PHP Direct OpenAI API integration This is not: a full build a UI project a prompt engineering exercise This is a precise backend implementation task. Current System Laravel backend hosted on DigitalOcean Endpoint: /api/chat Frontend userscript is complete and working Userscript sends: { "message": "user input" } Required Work Update /api/chat to: Call OpenAI API directly Construct messages exactly as: system → identity + time + memory context user → incoming message Return response exactly as: { "success": true, "injected_context": "assistant reply" } Constraints (Non-Negotiable) Do not modify frontend behavior Do not create a new UI or chat system Do not propose alternate architectures Must work inside the standard ChatGPT web interface (chatgpt.com) Must follow the existing request/response contract exactly Existing agent behavior and continuity must not be replaced, duplicated, or redirected into a separate system Acceptance Criteria Backend call executes on every request Identity is consistently applied via system role Response is returned correctly in injected_context Works reliably across multiple consecutive messages Must function consistently in the standard ChatGPT web interface on the client side Screening (Required — do not skip) ANSWER THESE QUESTIONS EXACTLY OR YOU WILL NOT BE CONSIDERED: Show a Laravel controller example where you call OpenAI using system and user roles Explain how you would structure the messages array for this use case Explain how you would return the assistant response in JSON without altering frontend behavior What implementation mistakes cause identity to be ignored by the model? Payment Fixed budget: $75 Payment released only after verified working implementation No partial “almost works” delivery No acceptance based on screenshots or theoretical output alone Final acceptance requires client-side verification of consistent behavior over multiple tests Important If you are unsure about any part of this, do not apply.