Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

!feat: ai sdk and configuration#41

Closed
okxiaoliang4 wants to merge 9 commits into
voideditor:mainfrom
okxiaoliang4:feature/ai-sdk
Closed

!feat: ai sdk and configuration#41
okxiaoliang4 wants to merge 9 commits into
voideditor:mainfrom
okxiaoliang4:feature/ai-sdk

Conversation

@okxiaoliang4

@okxiaoliang4 okxiaoliang4 commented Sep 20, 2024

Copy link
Copy Markdown
Contributor

Add @ai/sdk for multiple ai provider including ollama

closed: #27 #22 #42

  • ai package
  • ollama
  • azure
  • openai
  • anthropic

@okxiaoliang4

Copy link
Copy Markdown
Contributor Author

Should i merge into this okxiaoliang4#1 together? Will improve the setting configuration, can closed #42

* refactor: refine `anthropic` and `openai` settings

* refactor: improve configuration

* chore: move to headers config

* fix: ollama baseURL, add description

* chore: change azure deploymentId

* chore: eslint

* chore: update allowed_urls
@okxiaoliang4 okxiaoliang4 changed the title feat: ai sdk [WIP] !feat: ai sdk and configuration Sep 21, 2024
@okxiaoliang4

Copy link
Copy Markdown
Contributor Author

Fully configuration.

{
  "void.provider": "azure",
  "void.anthropic.apiKey": "",
  "void.anthropic.model": "claude-3-5-sonnet-20240620",
  "void.anthropic.providerSettings": {
    "baseURL": "",
    "headers": {}
  },
  "void.openai.apiKey": "",
  "void.openai.model": "gpt-4o",
  "void.openai.providerSettings": {
    "baseURL": "",
    "compatibility": "strict",
    "headers": {},
    "organization": "",
    "project": ""
  },
  "void.ollama.model": "llama3.1",
  "void.ollama.providerSettings": {
    "baseURL": "",
    "headers": {}
  },
  "void.azure.apiKey": "xxxx",
  "void.azure.deploymentId": "gpt-4o",
  "void.azure.resourceName": "xxxx",
  "void.azure.providerSettings": {
    "baseURL": "",
    "headers": {}
  },
  "void.greptile.apiKey": "apik_xxxx",
  "void.greptile.providerSettings": {
    "headers": {
      "X-Github-Token": "xxxx"
    },
    "repoinfo": [
      {
        "branch": "main",
        "remote": "github",
        "repository": "xxxx"
      }
    ]
  },
}

breaking change:

void.whichApi -> void.provider
void.anthropicApiKey -> void.anthropic.apiKey
void.openAIApiKey -> void.openai.apiKey
void.greptileApiKey -> void.greptile.apiKey
void.githubPAT -> void.greptile.providerSetting.headers['X-Github-Token']
void.ollamaSettings -> void.ollama.*

@mathewpareles

Copy link
Copy Markdown
Contributor

Yes, please merge these changes.

@okxiaoliang4

Copy link
Copy Markdown
Contributor Author

Yes, please merge these changes

Is merged. This PR is ready to review and merge

"type": "object",
"description": "Custom headers to include in the requests.",
"properties": {
"X-Github-Token": {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we change this to void.greptile.githubToken?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think so, yes.

@andrewpareles

Copy link
Copy Markdown
Contributor

Unfortunately we don't want to have a dependence on 'ai'. Please see CONTRIBUTING.md. Thanks for your contribution, and we'll add in azure support soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] Homogeneous SDK for all AI model providers via Vercel ai sdk

3 participants