Thanks to visit codestin.com
Credit goes to github.com

Skip to content

!feat: ai sdk and configuration#41

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

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

Conversation

@okxiaoliang4
Copy link
Contributor

@okxiaoliang4 okxiaoliang4 commented Sep 20, 2024

Add @ai/sdk for multiple ai provider including ollama

closed: #27 #22 #42

  • ai package
  • ollama
  • azure
  • openai
  • anthropic

@okxiaoliang4
Copy link
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
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
Contributor

Yes, please merge these changes.

@okxiaoliang4
Copy link
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
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
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
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 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.

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

3 participants