Skip to content
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

Prompt template override in BaseProvider #309

Merged
merged 13 commits into from
Aug 3, 2023

Conversation

JasonWeill
Copy link
Collaborator

Fix for #226: allows instances of BaseProvider to declare a custom prompt_template function that sets a prompt template. These templates may vary by format and local model ID.

@JasonWeill JasonWeill merged commit 51fd0d9 into jupyterlab:main Aug 3, 2023
3 checks passed
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Uses PromptTemplate class

* Code reorgnization for custom prompts

* Refactors prompt_template into BaseProvider

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Adds prompt_template function for getting templates

* Adds update_prompt_template function

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Makes prompt templates an instance var

* Renames getter function

* Uses underscore syntax for local variable

* Sets prompt_templates in ctor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Documents prompt templates

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* Uses PromptTemplate class

* Code reorgnization for custom prompts

* Refactors prompt_template into BaseProvider

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Adds prompt_template function for getting templates

* Adds update_prompt_template function

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Makes prompt templates an instance var

* Renames getter function

* Uses underscore syntax for local variable

* Sets prompt_templates in ctor

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Documents prompt templates

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/magics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants