-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for other LLM services #29
Comments
An IDE is needed for Prompt Engineers. Or someone like you will take the initiative, enhance it with a Sublime Text Plugin, and bring this feature to Sublime Text, which would be truly wonderful for all of us. I hope you never lose your motivation for the project, I will become a sponsor as soon as possible - I sincerely thank you for your contribution. |
Hi @yaroslavyaroslav @yigitkonur - I believe we can make this easier If this looks useful (we're used in production)- please let me know how we can help. UsagePaLM request curl http://0.0.0.0:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "palm/chat-bison",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}' gpt-3.5-turbo request curl http://0.0.0.0:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}' claude-2 request curl http://0.0.0.0:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-2",
"messages": [{"role": "user", "content": "Say this is a test!"}],
"temperature": 0.7
}' |
@ishaan-jaff wow, thanks for highlighting this. Indeed this could be a simpler solution, than implementing all of those by my own. Even though there're some caveats on Sublime Text side we have here, e.g. there's a hardly limited list of dependency we can rely on within the plugin code. Though I saw such plugins that was rely on complete third party solution, like some node.js running code, so this should be solvable. Just a few question I have here, that I hope would save some time on both sides:
|
|
@ishaan-jaff Thanks, I'll consider it in depth when I'll come closer to implementing this one. |
It would be cool if this plugin supported Ollama. You can run it locally as a standalone server, and make API calls to it: https://github.com/jmorganca/ollama/blob/main/docs/api.md |
Hi @james2doyle litellm already supports ollama |
@ishaan-jaff Oh nice. I misunderstood what litellm was, I thought it was a hosted service |
no worries - litellm is a python package to call 100+ LLMs in the same I/O format. We also offer a proxy server if you don't want to make code changes to your app |
FYI: for now there's no option to use arbitrary dependency within the ST plug-in, but TIL that package control 4.0 beta allows just this, regarding its current state I believe it would be released within a quarter of something. So all work in regards of this task will be started right after that release, as well as some other missed features, like precise tokens count. UPD: I found PC 4.0 beta project, so I believe that it's quite far from being released in next quarter. |
The good news is that PC 4.0.0 released has been just yet, which means soon it'll be possible to add support for a custom python libraries into the package. We're not there yet, coz packagecontrol.io itself still doesn't fully supports 4.0.0 scheme (e.g. arbitrary libraries as dependencies), but I believe that it would take about a month or two to make it happen. |
Any news on this? Per now using https://github.com/icebaker/nano-bots-api via https://github.com/icebaker/sublime-nano-bots to talk to Ollama / Mistral locally. Which works, but would like to see if something using this could be better. |
Nope unfortunately, every time I tried any local llm as an assistant for my language of interest I noticed a way below gpt4 suggestions quality. More than that the same picture I'm observing with the all competing services as perplexity. So honestly I have no plans to implement this until things changes. Peeking at the very last bard/geminy 1m context window though. Maybe it'll worth it. |
I was able to make Ollama working by some small changes, as Ollama API is compatible with OpenAI API:
"assistants": [
{
"assistant_role": "Apply the change requested by the user to the code with respect to senior knowledge of programming",
"chat_model": "codellama",
"max_tokens": 4000,
"name": "Replace",
"prompt_mode": "replace"
},
{
"assistant_role": "Insert code or whatever user will request with the following command instead of placeholder with respect to senior knowledge of programming",
"chat_model": "codellama",
"max_tokens": 4000,
"name": "Insert",
"prompt_mode": "insert",
"placeholder": "## placeholder"
},
{
"assistant_role": "Append code or whatever user will request with the following command instead of placeholder with respect to senior knowledge of programming",
"chat_model": "codellama",
"max_tokens": 4000,
"name": "Append",
"prompt_mode": "append"
},
] So it will work nicely, if there would be config options to:
|
@Aiq0 Confirmed working, thank you! |
You are welcome. (sorry, that was typo) |
OK, I am going to add some config settings for tweaking connection and create PR (most likely tomorrow). Is there anything other that should be considered? |
I believe not much. Just please try to avoid to overcomplicating things. Like to not present an additional settings if they can be avoided (e.g. I believe that it's perfectly fine to come along with dummy token on the user side for a local models rather than providing a separate toggle for that). If you're about to add some global settings options, please consider to do so on the first level if it's possible. A few words dropped in Readme about this new feature would definitely worth it either. |
There's a few competitive services released their API just yet.
The text was updated successfully, but these errors were encountered: