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 support for Custom Model to OpenAI settings #3225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cmgriffing
Copy link


Description

This PR adds a new setting to VSCode in the AI section for a custom model name to be sent to an OpenAI-compatible API. A larger PR was in the works until I realized that the existing custom URL functionality would work.

Closes #3223

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

@cmgriffing
Copy link
Author

cmgriffing commented Apr 10, 2024

I have not made any changes to the CHANGELOG or README, yet. I am happy to do so after we have agreed on the approach in this PR.

I have a different version of this PR that adds a CustomProvider class, but after some thought, it might not be necessary since the custom URL for OpenAI is very close to working with any server (not just Azure).

@cmgriffing-at-gitkraken
Copy link

@SpaceMerlin33 Do you mind taking a look at this?

@cmgriffing-at-gitkraken

@trevor-polidore Let me know what you think.

@eamodio
Copy link
Member

eamodio commented May 18, 2024

@cmgriffing There have been significant changes to the AI providers, can you adapt this to the new model?

"order": 102
},
"gitlens.ai.experimental.openai.customModel": {
"type": [
Copy link
Member

Choose a reason for hiding this comment

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

Do we need another setting for the custom model? Can't we just use the model setting above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option for Custom AI functionality using URL of OpenAI compatible API
4 participants