[Lazarus] AI Assistant added
Michael Van Canneyt
michael at freepascal.org
Sat Jan 4 16:02:40 CET 2025
Hi,
I've added an AI assistant (AIssist) to the Lazarus codebase.
Check out components/aissist.
It is a first, rudimentary, implementation that has been tested with Jan AI.
(Jan AI must be installed separately, see https://jan.ai/)
It currently offers:
- a chat window in which you can chat with an AI (menu: view - AIssist chat)
- an 'Explain code' menu entry in the source menu
- a settings dialog under tools.
The actual AI REST API has been abstracted away, so it should be possible to
add other APIs.
The "Jan AI" REST API is compatible to the ChatGPT API, so it should be
possible to extend the implementation to include authentication and
connect to ChatGPT.
All this is meant to provide a start for a CoPilot-kind of functionality,
as well as a possibility to generate e.g. fpdoc documentation for code.
As said, it is an initial implementation, ideas for improvements or new
functionality are of course more than welcome.
Michael.
PS. If you run the AI locally, make sure you have a good graphics card with
lots of memory, or be prepared to wait for some time for answers:
30 seconds is the average wait time on my nearly-10-year old PC...
More information about the lazarus
mailing list