Add initial system prompt in ChatHandler and completion#28
Conversation
c1b8b79 to
1befdfa
Compare
| import { getChatModel, IBaseCompleter } from './llm-models'; | ||
| import { IAIProvider } from './token'; | ||
|
|
||
| export const chatSystemPrompt = (provider_name: string) => ` |
There was a problem hiding this comment.
Should this function take a single option, instead of raw parameters like provider_name?
Wondering if this could make it easier to extend later.
Wondering why we would need a getter / setter on the completer for the |
Yes, and even with the settings it could only be a writable property, since there is nothing more in the getter / setter. |
Fixes #25
Use the same prompts as
jupyter-ai(except for the model name, which is not part of theBaseChatModeland may not be provided by all chat model).NOTES
Currently the completion prompt is not used by the codestral completer, because the codestral completer uses a text completion model, which doesn't seem to allow such prompts.
For a follow up PR, we should:
BaseCompleterclass that may fit with most of the completersFOLLOW UP
We could add a setting to let user define their own prompt #25 (comment)