Skip to content

Conversation

PolarishT
Copy link
Contributor

What does this PR do?

Add DashScope LLMs chat example

PolarishT and others added 5 commits February 16, 2025 20:50
Signed-off-by: PolarishT <zhangzhenting@corp.netease.com>
Signed-off-by: PolarishT <zhangzhenting@corp.netease.com>
Signed-off-by: PolarishT <zhangzhenting@corp.netease.com>
Copy link
Member

Choose a reason for hiding this comment

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

这个 .keep 不要删,是为了保持这个文件夹,github 默认不会保存空的文件夹再 github

Copy link
Contributor Author

Choose a reason for hiding this comment

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

学到了,我以为是我使用的XcodeMap引入的奇奇怪怪的东西

Signed-off-by: PolarishT <zhangzhenting@corp.netease.com>
Signed-off-by: PolarishT <zhangzhenting@corp.netease.com>
</dependencies>

<build>
<finalName>app.jar</finalName>
Copy link
Member

Choose a reason for hiding this comment

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

这里加这个是?

@@ -35,8 +48,38 @@ public class SAAFunctionController {

private final SAAFunctionService functionService;

public SAAFunctionController(SAAFunctionService functionService) {
private final SAABaseService baseService;
Copy link
Member

Choose a reason for hiding this comment

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

注入这个似乎用不到?注入 function service 就好了

@UserIp
@GetMapping("tool-call")
@Operation(summary = "DashScope ToolCall Chat")
public Flux<Result<String>> chat(
Copy link
Member

Choose a reason for hiding this comment

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

这里改成 Flux 就好了,Result jianyi 不好解析


this.defaultChatClient =
ChatClient.builder(new DashScopeChatModel(new DashScopeApi(System.getenv(
Copy link
Member

Choose a reason for hiding this comment

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

这里为啥要这样写哇?chatmodel autoconfiguration 会自己注入的,你这是用 ai 写的吗?ai 的代码质量堪忧哇

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我自己写的哇
我习惯这样写了 哈哈哈哈

@yuluo-yx yuluo-yx merged commit afc44ce into springaialibaba:main Mar 9, 2025
1 check passed
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.

2 participants