devinyf / dashscopego

Tongyi Qwen Aliyun Dashscope API Golang implementation, non-official
MIT License
18 stars 5 forks source link

Allow to change the DashScopeBaseURL to support international version #8

Closed carlos-vorto closed 3 months ago

carlos-vorto commented 3 months ago

There is another endpoint to access DashScope api using the internaltional version: https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/text-generation/generation

Currently its not possible to edit this.

https://www.alibabacloud.com/help/en/model-studio/developer-reference/model-calling-in-sub-workspace

devinyf commented 3 months ago

Add a new client, try to use NewTongyiClientIntl instead of NewTongyiClient

// cli := dashscopego.NewTongyiClient(model, token)
cli := dashscopego.NewTongyiClientIntl(model, token)

Hope this helps, Thanks.

carlos-vorto commented 3 months ago

Thanks a lot man! I will test now.

carlos-vorto commented 3 months ago

Tested, works as expected, thanks!