LINQPad AI Assistant Preview - feedback needed
The latest beta now has an AI coding assistant.
To activate the assistant, press Ctrl+P. This will display a list of prompts, each of which starts a ChatGPT-style conversation.
All messages in the conversations can be edited on each submission (including system prompts), and by clicking Save, you can create custom prompts that will appear in the main list. There are also options to compare assistant-generated code with your own, and replace or insert AI code into the editor.
Conversations can optionally incorporate selected code from your query, as well as the current runtime error or compilation error message.
See Help | What's New or the online release notes for more info.
Let me know your thoughts!
Comments
After pressing ctrl p for AI assistant.
The above error popped up after pressing "ctrl p", the AI assistant. The openAI api key has been entered at the edit AI Setting
After I clicked on the "Cancel" button in the dialog, I got this:
If I just go to the Edit --> AI --> Personal Assistant, I also see the null exception error.
Thanks for the early heads-up. I've got your error report and it should be fixed now.
I use it in company environment and have to use a different proxy, like for nuget otherwise requests fail.
Thanks. The problem is now fixed with new update.
I think it would be great if the contents of #load referenced queries could be included.
Some of the formatting is lost receiving data from the Assistant. For example, the following would benefit from highlighting the method names and keywords in the backticks.
I'd like to clean up AI Chat panels. For example, if Chat 1, Chat 2, and Chat 3 panels exist, close Chat 3. Currently I resort to closing and reopening the Query to clean up the AI panel.
@Swampy This is a tricky one. Because the conversation is fully editable (including Assistant responses), it would require a WYSIWYG editor with a formatting toolbar.
@Sorax - will add a feature for that.
This is great!
@JoeAlbahari Can you add the query snippets directory where prompts are stored to search ( look in, search in)?
I have thousands of queries and will likely have as many prompts so search is important.
@JoeAlbahari thank you for the Close option on the AI tabs.
Today I'm working on a project in which I collect information from source apis. I instinctually selected text in the results and pressed Ctrl+P to ask questions about it. Of course, this didn't work but it led me here to suggest adding the selection of text in the Results tab to be an input for the AI.
@JoeAlbahari
How to switch between Curie, Davinci, Babbage, Ada models when using the Ai Assistant?
@Sorax - Nice idea. Working with result data is certainly possible, although there are some challenges with token limits and formatting tabular data. What are some examples where you think it would be useful?
@THenrich - These are not chat-based models, and so would not couple well to LINQPad's AI Assistant interface. Is there a specific reason that you'd like to use these models?
@JoeAlbahari Ok Thanks. I thought they are used in the APIs. They have different pricing structures and the better ones give better results according to their site.
It would be great if this UI could persist across queries as a standalone tool, optionally available for global use rather than being attached to specific queries.
Can LINQPad support ChatGPT in Azure? by specify openai endpoint, deployment id and apikey.
LINQPad AI features are GUI based. To use OpenAI APIs in Azure, you would need to either create your own integration or use a third-party integration with OpenAI. Azure offers OpenAI services that can be used for this purpose.
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/overview
https://azure.microsoft.com/en-us/products/cognitive-services/openai-service
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/
https://azure.microsoft.com/en-us/pricing/details/cognitive-services/openai-service/
@stephensmitchell - Is this to allow you to close a query without its AI conversation disappearing, or is there another benefit that you have in mind? And would a "Detach from query" button work?
@sdflysha - Will probably add this option when Azure-hosted OpenAI becomes publicly available.
@JoeAlbahari can you add this for local installs also. That can be useful for using Open Source AI and ChatGPT alternatives.
I use LINQPad for building complete apps, tools or overall solutions. I have multiple LINQPad 7 and 5 apps running for different tasks.
I want to use the AI features standalone so I open another LINQPad and use it only for that purpose. I then clone the conversion for other tasks.
This works but has obvious drawbacks.
The AI panel being linked to a query doesn't work for me because I open and close queries constantly. I also want to use the AI panel at runtime or in production, not only when coding or debugging. In the first image above I need to update a 3D algorithm for more complex meshes. I need to see the results and work with different tools then make changes to the code in LINQPad, review results, etc.
I think it would be better to add a non-modal AI window with conversion and prompt saving so we don't lose work.
Similar to the prompt window.
A pinnable tab panel or something similar may work too.
Hey @JoeAlbahari, Azure hosted OpenAI already becomes publicly available, only with a form request, pleease try introduce OpenAI in Azure in LINQPad!!! Because it's only option available in China.
There is Azure support now in 7.7.11:
https://www.linqpad.net/linqpad7.aspx#beta
Let me know how you get on.
Enhancement:
Add a check all button in the save prompt dialog to avoid clicking each one by one:
And or add a button to the Personal Assistant tab to check all and save at once (this is preferred to save time):
Thanks.
Issue:
When loading a prompt code blocks are duplicating.
Original Conversation: Everything works fine
Conversation loaded from prompt window: Weird duplicating issues
The "Language" property has the same value as "Text" property. "Language" should be "C#".
Here is the prompt:
http://share.linqpad.net/t2ev2p.linq
Thanks - I'll get a fix out today. Will look into adding a "check all" option soon.