While working on https://whatthediff.ai/?utm_campaign=beyondcode&utm_source=blog - an AI powered code review assistant (written in PHP with Laravel) I learned a lot about OpenAI and how to come up with good prompts. Among other things, I demoed how you can make use of the OpenAI API and use it to try and provide solutions for your Laravel and PHP exceptions.
In order to make API calls to OpenAI, you will need to https://platform.openai.com/ and create an API key.
Now all you need to do is add your OpenAI API key to your.env file: Adding solutions to Ignition
public function getSolutionTitle(): string { return 'AI Generated Solution'; } public function getSolutionDescription(): string { return $this->solution; } public function getDocumentationLinks(): array { return []; }