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

feat: add Github provider for language models #1109

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

newnol
Copy link

@newnol newnol commented Jan 16, 2025

1. Added New File: github.ts

Location: app/lib/modules/llm/providers/github.ts
Content:

  • Created the GithubProvider class, which extends BaseProvider.
  • Defined available AI models from Github:
    • gpt-4o, o1, o1-mini, gpt-4o-mini, gpt-4-turbo, gpt-4, gpt-3.5-turbo.
  • Integrated the API using the GITHUB_API_KEY.
  • Utilized the @ai-sdk/openai library to connect to the URL:
    https://models.inference.ai.azure.com
    

2. Added GithubProvider to the Provider Management System

File: app/lib/modules/llm/registry.ts
Content:

  • Imported GithubProvider into the system.
  • Registered the new provider in the export list.

Significance of This PR

Objective:

  • Expand the system to support additional language models from Github.

Benefits:

  • Increases flexibility in selecting AI models.
  • Simplifies integration with additional AI services from the Github Marketplace.

@thecodacus thecodacus added the model-provider This is a model provider addition label Jan 16, 2025
@thecodacus thecodacus merged commit c773824 into stackblitz-labs:main Jan 17, 2025
1 check passed
@Cloudinfo-Github
Copy link

Could you please provide detailed instructions for this part? I am currently using the free github api, but I only have 8,000 tokens that will soon run out. But if you want to know how to use Azure AI specifically, please provide a complete explanation.

timoa pushed a commit to timoa/bolt.diy that referenced this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model-provider This is a model provider addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants