efugier / smartcat

Putting a brain behind `cat`πŸˆβ€β¬› Integrating language models in the Unix commands ecosystem through text streams.

Home Page:https://crates.io/crates/smartcat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copilot Support?

leeola opened this issue Β· comments

Is Github Copilot supported on Smartcat? It seems like not, but this project is tagged with Copilot.

edit: I should add, i am aware Copilot and GPT4 share a lot of functionality, but i was hoping to use my Copilot subscription.

Hey sorry it's not supported as of now. It may be in the somewhat near future.

The main blocker is that copilot's API is not public. I could take inspiration from project like https://github.com/github/copilot.vim but this is more work for an API that has no guarantee to be stable.

However, I have to say chatgpt's api is very cheap for individual usage. It's pay as you go and for a month it totaled to 1.75$ for me with heavy usage and the latest model: https://openai.com/pricing.

I'm also working on integrating with Mistral.

Shouldn't Copilot be removed from this repos tags then? I'm not sure what this repo has to do with Copilot?

It's there because I use it as a copilot (lower-case C). Smartcat is usable within the editor if yours plays nice with text streams πŸ™‚ (e.g. Vim, Kakoune, Helix...).

ah okay lol, kinda confusing imo - but Github took a basic word 🀷

Yes ahah, I actually started this project because copilot was not available for the editor I use (helix), and in my current workflow it kinda holds the same role!

Out of curiosity, would you be interested in generalizing the underlying communication, if support for Copilot was added?

I'm not sure what you mean by that πŸ€”

Hah, think i was short on coffee and missed a word. Generalizing the underlying LLM APIs (in this case, generalizing OpenAPI IO), if it isn't already, as to allow for alternate impls of LLMs/etc.

Might be some overlapping space with other similar libraries, too. Eg core libs of llmvm /etc generalize this i believe?

Smartcat is supposed to remain a minimal tool compliant with the unix philosophy. It's pretty unlikely for the project to get abstracted and separated in several lib. However, it's built with the requirement of supporting multiple llm providers in mind.

For now, the only other supported provider is Mistral AI.

As it is almost the same schema as openai additional code was requiered but basically there's kind of an adapter pattern from the generic prompt schema of smartcat to the target API for the call.

Implementing new ones should be super fast if the API is well documented πŸ™‚