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

Add examples of using Fields and EnvAuthStrategy to developer documentation #1056

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

alanmeeson
Copy link
Contributor

Based on my (as yet unsuccessful) attempts to add a custom provider, I have captured the bits which I have managed to figure out and get working and added examples of them to the developer docs to help any one looking to add new providers in the future.

I think this could do with a review from someone who understands the Provider design better than I do, to make sure that what I have put is reasonably correct.

Copy link
Member

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanmeeson Thank you for contributing this valuable documentation! Just a minor comment on the formatting below; otherwise this looks great.

This documentation will be online after this PR is merged; no release is required for this change to be made visible.

docs/source/developers/index.md Outdated Show resolved Hide resolved
alanmeeson and others added 5 commits October 30, 2024 17:54
I have created this example based on some delving into the code and looking
at examples of some of the community providers.
I haven't included the IntegerField, as I couldn't get it to work properly,
suggesting that I don't understand it properly, whereas I have
successfully tested the TextField and MultilineTextField.
As per review feedback,  combined the two sections and examples for
brevity.  Also added a couple of missing imports to the example.
Copy link
Member

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alanmeeson Great work, thank you! 🎉

Note that we do have example implementations of custom providers & slash commands in packages/jupyter-ai-test on this repo. That may be helpful.

Feel free to open issues or PRs in the future if you encounter more difficulty implementing a custom provider.

@dlqqq dlqqq merged commit bafccef into jupyterlab:main Oct 31, 2024
10 checks passed
@dlqqq
Copy link
Member

dlqqq commented Oct 31, 2024

@meeseeksdev please backport to v3-dev

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Oct 31, 2024
dlqqq pushed a commit that referenced this pull request Oct 31, 2024
…o developer documentation (#1073)

Co-authored-by: Alan Meeson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants