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: support alibaba cloud dashscope ai #1233

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

Conversation

NovXxf
Copy link

@NovXxf NovXxf commented Aug 19, 2024

Closes #

📑 Description

This PR adds support for Alibaba Cloud DashScope AI to assist developers using Alibaba Cloud. Since the DashScope AI client for Go is not yet available, this implementation uses the OpenAI client in compatibility mode. Although an OpenAI client already exists, its limitation on token length prevents it from connecting to DashScope.

✅ Checks

  • [✅] My pull request adheres to the code style of this project
  • [✅] My code requires changes to the documentation
  • [✅] I have updated the documentation as required
  • [✅] All the tests have passed

ℹ Additional Information

@NovXxf NovXxf requested review from a team as code owners August 19, 2024 13:50
}

func (c *DashScopeClient) Configure(config IAIConfig) error {
const defaultBaseURL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using a custom base url for the openAI provider rather than writing a new one

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

Successfully merging this pull request may close these issues.

2 participants