Clarification on how the Inline Completer works

Could someone provide more details on how the new Inline Completer works?

Without jupyter-ai, does the history provider internally call an LLM to suggest code? If so, which one?

With jupyter-ai installed and LLM setup, does the Inline Completer use the selected LLM for code suggestion? Thanks

Hailiang

No, it just searches the history for matching fragments.

With jupyter-ai installed and LLM setup, does the Inline Completer use the selected LLM for code suggestion

If you enable it in the settings, yes.

Thank you for taking the time to reply to my question. If I enable both the history provider and jupyter-ai provider, will one dominate the other or will the best of the two be used to suggest to the user?

If I enable both the history provider and jupyter-ai provider, will one dominate the other

No, suggestions from both will be available. There is a little icon on the hover box which shows from which provider the suggestion is coming and there are buttons (and shortcuts) to cycle through the suggestions.

will the best of the two be used to suggest to the user

The ranking is pre-determined by user preference in the settings. There is currently no global per-suggestion ranking but we could implement it. Of course this would require all providers to assign some kind of weight to each suggestion and to use a consistent scale. The problem is that when streaming is used (the suggestion is generated in flight) we would not know how good the suggestion will be because it was not yet generated.