@JFalcon - sure, I'll add a custom endpoint option to the next build.
@stephensmitchell - for now, I can add an option to override the model. The Davinci models won't work, however, because they don't support conversations. Only chat-based models (i.e., 3.5-turbo, 4.0 and their variants) will work.
CTRL+P is opening the Insert Snippet dropdown, not the AI Assistant.
I can only get the 3.5 models to work. All GPT-4 models (https://platform.openai.com/docs/models/gpt-4) result in a LINQPad dialogue saying the model doesn't exist. I paste the model's string name into the text box in the AI Configuration dialog.
Duh! You are right. I need to wait a bit longer. I was using my org key before, and that got me to believe I would have access already with my personal key.
I'm trying out the AI functionality with anthropic and I'm getting the following message.
The issue is anthropic requires extra header fields and currently LINQPad only allows one at the moment.
@fsmirne said:
I'm trying out the AI functionality with anthropic and I'm getting the following message.
The issue is anthropic requires extra header fields and currently LINQPad only allows one at the moment.
Thanks to your example I did sort of manage to get Claude to work in Linqpad as a custom AI, but I had to do something kind of hacky. It seems that the format that Anthropic expects is different from the regular OpenAI spec.
Since the AI stuff is mostly hidden and I couldn't really find it in ILSpy, I took the Web API example and made a sort of hacky proxy just to see the request and responses.
With settings like this, I was able to get a request and response, but at this point I dropped it to get real work done. So if someone else wants to run with it, feel free.
Claude has a different API that's incompatible with that of OpenAI.
I'll consider adding support for it, but in the meantime, have you considered using OpenRouter? The latest version of LINQPad supports OpenRouter - go to Help | What's New for instructions. OpenRouter supports all popular models, including Claude Sonnet.
Nice, this works a treat. Thank you for the suggestion, I'd never heard of Openrouter before.
I'm in the midst of trying to fight with reform my organization's AI rules so something like this will definitely help, I think.
Comments
@JFalcon - sure, I'll add a custom endpoint option to the next build.
@stephensmitchell - for now, I can add an option to override the model. The Davinci models won't work, however, because they don't support conversations. Only chat-based models (i.e., 3.5-turbo, 4.0 and their variants) will work.
Custom endpoints are now supported in 7.8.3. Let me know how you get on.
https://www.linqpad.net/linqpad7.aspx#beta
A couple of things:
(
For now, you can work around the Ctrl+P issue by re-enabling the default "Use Visual Studio Shortcut Keys" in Edit | Preferences > Advanced, Editor.
Regarding GPT-4, are you sure that you have access?
https://community.openai.com/t/gpt-4-model-does-not-exist/291988/12
Duh! You are right. I need to wait a bit longer. I was using my org key before, and that got me to believe I would have access already with my personal key.
@JoeAlbahari
Next to the Save as Prompt button can you please add a button to save all messages with the same name as your query to the snippets folder?
I always want to save everything to file with all messages because I clean up the conversion before the save.
This window:
Is only useful when you don't want to select all messages and save somewhere other than the snippets folder.
So a way to allow us to bypass that window and save all messages directly to a file would be a huge time saver.
Thanks.
I solved this with autoit and win32.
I'm trying out the AI functionality with anthropic and I'm getting the following message.
The issue is anthropic requires extra header fields and currently LINQPad only allows one at the moment.
Check out 8.8.3 - it now lets you add additional headers in AI Settings.
Thanks to your example I did sort of manage to get Claude to work in Linqpad as a custom AI, but I had to do something kind of hacky. It seems that the format that Anthropic expects is different from the regular OpenAI spec.
Since the AI stuff is mostly hidden and I couldn't really find it in ILSpy, I took the Web API example and made a sort of hacky proxy just to see the request and responses.
https://share.linqpad.net/8muulqum.linq
With settings like this, I was able to get a request and response, but at this point I dropped it to get real work done. So if someone else wants to run with it, feel free.
Claude has a different API that's incompatible with that of OpenAI.
I'll consider adding support for it, but in the meantime, have you considered using OpenRouter? The latest version of LINQPad supports OpenRouter - go to Help | What's New for instructions. OpenRouter supports all popular models, including Claude Sonnet.
Nice, this works a treat. Thank you for the suggestion, I'd never heard of Openrouter before.
I'm in the midst of trying to fight with reform my organization's AI rules so something like this will definitely help, I think.