F
Filamentβ€’9mo ago
vitali

How I can integrate AI inside filamentphp?

Hi all, basically my client wants to have chatgpt ai integration with his filamentphp app. AI must tell him tespt to do to reduce costs, better organizations of resources, calendars, tasks, expenses and so on... My question is , how does it work? AI must read actual data and process the data to give answers? OR how? Need to implement custom models code? Thanks, if anyone ever did something like that before appreciate a good feedback πŸ™
4 Replies
Sjoerd24
Sjoerd24β€’9mo ago
I would temper expectations first of all, in my testing some things work great but what you describe is not yet possible. Furthermore i got it to work with the following tutorial: https://laraveldaily.com/post/laravel-use-simple-external-3rd-party-api It is behind a paywall but just charge your customer for it, worth the money imo.
ModestasV
ModestasVβ€’9mo ago
Free resource from our team (laraveldaily) on exactly that: https://pythonmldaily.com/courses/python-chatbot-database-cars
ModestasV
ModestasVβ€’9mo ago
Of course, it has python at the endpoint, but... you can definitely build a PHP one! It's as simple as using a https://github.com/beyondcode/laravel-ask-database (not the package itself, but the code and idea) and then building a connection in-between.
GitHub
GitHub - beyondcode/laravel-ask-database: Query your database using...
Query your database using natural language. Contribute to beyondcode/laravel-ask-database development by creating an account on GitHub.
ModestasV
ModestasVβ€’9mo ago
Also, will expand a bit on your original question:
AI must tell him tespt to do to reduce costs, better organizations of resources, calendars, tasks, expenses and so on...
This will be a dangerous road. Like seriously, I wouldn't trust the AI with this at all.
My question is , how does it work? AI must read actual data and process the data to give answers? OR how? Need to implement custom models code?
You have to compile your data into an AI prompt. A few words in a prompt can completely change the output. So you have to be really careful. And no, you don't need to add any custom code. It is all about context/implementation. Only thing to keep in mind - AI is stupid. Like toddler level stupid. It will do what you ask it to do, but it doesn't mean you need to trust it. I've worked on AI for 6 months in various forms and... I would not trust it to make any decision. An advice? sure, but then I would do my own research. But never a full decision.

Did you find this page helpful?