alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.94k stars 8.33k forks source link

AI(tongyi)Whether multiple APIkeys conflict? #3790

Open YunaiV opened 4 months ago

YunaiV commented 4 months ago

Which Component AI(tongyi)

Describe what problem you have encountered

Question 1、https://github.com/alibaba/spring-cloud-alibaba/blob/2023.x/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-ai/src/main/java/com/alibaba/cloud/ai/tongyi/TongYiAutoConfiguration.java#L219

中文:这个 apiKey 目前是全局设置,那么一个应用里如果有多个 apiKey 会不会存在冲突? 是不是放到 TongYiChatModel 里,通过 request 传递 apiKey 可以解决。

English:This apiKey is currently set globally, so if there are multiple apikeys in an application, will there be conflicts? Is it put into TongYiChatModel? It can be solved by passing apiKey through request.

Question 2、增量返回不生效。 English:incrementalOutput does not take effect

yuluo-yx commented 3 months ago

good idea. 👍

yuluo-yx commented 3 months ago

hi, @YunaiV For question two, you can see https://github.com/alibaba/spring-cloud-alibaba/blob/6c26a49ec3f8991745a27783418529fe5b9db1f4/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-ai/src/main/java/com/alibaba/cloud/ai/tongyi/chat/TongYiChatModel.java#L185, in next version, It will is default enable.

YunaiV commented 3 months ago

hi, @YunaiV For question two, you can see

https://github.com/alibaba/spring-cloud-alibaba/blob/6c26a49ec3f8991745a27783418529fe5b9db1f4/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-ai/src/main/java/com/alibaba/cloud/ai/tongyi/chat/TongYiChatModel.java#L185

, in next version, It will is default enable.

thanks~

Is there an expected release date?

No hurry, just ask

yuluo-yx commented 3 months ago

暂时没有确定得发布计划,spring ai 目前 chat api 做了些修改,计划是等 chat 稳定之后,把 function call 一起做下。 明确发版计划,说不上具体时间

YunaiV commented 3 months ago

暂时没有确定得发布计划,spring ai 目前 chat api 做了些修改,计划是等 chat 稳定之后,把 function call 一起做下。 明确发版计划,说不上具体时间

thanks~

I'm just copying the code into the project and that's fine