Open
Description
Define better prompts for certain models (eg. Starcoder2) instead of using the default ones.
For this classmethods of BaseProvider must be overwritten:
- def update_prompt_template(self, format: str, template: str):
- def get_prompt_template(self, format) -> PromptTemplate:
- def get_chat_prompt_template(self) -> PromptTemplate:
- def get_completion_prompt_template(self) -> PromptTemplate:
Details here: https://github.com/jupyterlab/jupyter-ai/blob/v2.20.0/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py#L366
Example:
TogetherAIProvider(BaseProvider, Together) -> def get_prompt_template(self, format) -> PromptTemplate:
https://github.com/jupyterlab/jupyter-ai/blob/v2.20.0/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py#L736
Metadata
Assignees
Labels
No labels
Activity