AI features
Have a plug-in that does the following:
- [x] Is able to get the context of the file the user is in
- [x] Prompts the user for what they'd like to do
- [x] Use the above to send information to an API
- [x] Google Gemini
- [x] OpenAI ChatGPT
- [x] Anthropic Claude
- [x] Processes the result and inserts it into the code file
- [x] API key is assigned during set-up assistant
- [x] Thorough testing
- [ ] AI prompt
- [ ] AI sidebar
@curlpipe Could we also get OpenAI API or Claude API?
@curlpipe Could we also get OpenAI API or Claude API?
That can be arranged :+1:
@plyght Working on this at the moment, I don't have an API key for ChatGPT or Claude as they are quite expensive, which makes it hard for me to test how they work. Gemini has a free plan (it is rate limited, but these are generous) and seems to be working OK so far.
@curlpipe I have both; let me know when you release it and i'll be happy to test. I could also test now if needed!
@plyght Great, I will try my best to write in ChatGPT and Claude support, hopefully they work first time :pray:
@curlpipe Has this been implemented into a release version yet? - Just following up.
not yet - I'll let you know when it is released 👍
@plyght released with 0.7.6
Documentation can be found here: https://github.com/curlpipe/ox/wiki/Plugins#ai
Let me know if claude and chatgpt works (they probably won't, but hopefully they magically do)
I'll keep this issue open until claude and chatgpt are working like a charm 👍
@curlpipe
From my testing, it seems that OpenAI/Claude integration doesn’t work as expected. I believe this might be due to the need for the user to specify which “provider” they are using.
Additionally (and this is just based on my personal experience and preferences, so feel free to take it or leave it), I’m not a big fan of using comments in the file as a way to prompt the AI. While it works, I find it a bit odd to use as it feels out of place. Perhaps there’s a way to implement a more UI/X friendly method? Just a thought!
From my testing, it seems that OpenAI/Claude integration doesn’t work as expected. I believe this might be due to the need for the user to specify which “provider” they are using.
Did you manually add ai = { model = "chatgpt", key = "api key goes here" } below the load_plugin("ai.lua") in your config file? Or did you use the configuration assistant?
Are there any errors you can see?
I’m not a big fan of using comments in the file as a way to prompt the AI
I really value your feedback - so please feel free to voice more opinions if you have them.
I think you're right, it's not ideal. Maybe by default, I could have it ask the user at the bottom (like it would for searching/replacing/commands/opening a file).
The other option is to have like an AI menu, similar to how file tree works, which is what cursor does. That would take quite a bit of effort to do, but it would make more sense and be more familiar to use.
I manually added ai = { model = "chatgpt", key = "my-api-key-here" } like so: -- Load Plug-Ins -- load_plugin("autoindent.lua") load_plugin("pairs.lua") load_plugin("quickcomment.lua") load_plugin("ai.lua") ai = { model = "gpt-4o", key = "my-api-key-here" }
here is a screenshot for more clarity: