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

Skip to content

Commit 2cc3be3

Browse files
authored
feat: Refine quickstart docs (agentscope-ai#78)
1 parent a026b8f commit 2cc3be3

13 files changed

Lines changed: 589 additions & 1537 deletions

File tree

docs/_toc.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ parts:
2121
title: Installation
2222
- file: en/quickstart/key-concepts
2323
title: Key Concepts
24-
- file: en/quickstart/message
25-
title: Message System
2624
- file: en/quickstart/agent
2725
title: Agent
2826

@@ -55,8 +53,6 @@ parts:
5553
title: 安装
5654
- file: zh/quickstart/key-concepts
5755
title: 核心概念
58-
- file: zh/quickstart/message
59-
title: 消息系统
6056
- file: zh/quickstart/agent
6157
title: 智能体
6258

docs/en/README.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/en/intro.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,28 @@ Follow these steps to get started with AgentScope Java:
3030

3131
1. **[Installation](quickstart/installation.md)** - Set up AgentScope Java in your project
3232
2. **[Key Concepts](quickstart/key-concepts.md)** - Understand core concepts and architecture
33-
3. **[Message System](quickstart/message.md)** - Learn about the message system
34-
4. **[Build Your First Agent](quickstart/agent.md)** - Create a working agent
33+
3. **[Build Your First Agent](quickstart/agent.md)** - Create a working agent
3534

3635
## Quick Example
3736

3837
```java
3938
import io.agentscope.core.ReActAgent;
4039
import io.agentscope.core.model.DashScopeChatModel;
4140
import io.agentscope.core.message.Msg;
42-
import io.agentscope.core.message.MsgRole;
43-
import io.agentscope.core.message.TextBlock;
4441

45-
// Create a model
46-
var model = DashScopeChatModel.builder()
47-
.apiKey(System.getenv("DASHSCOPE_API_KEY"))
48-
.modelName("qwen-plus")
49-
.build();
50-
51-
// Create an agent
42+
// Create an agent with inline model configuration
5243
var agent = ReActAgent.builder()
5344
.name("Assistant")
54-
.model(model)
45+
.model(DashScopeChatModel.builder()
46+
.apiKey(System.getenv("DASHSCOPE_API_KEY"))
47+
.modelName("qwen-plus")
48+
.build())
5549
.sysPrompt("You are a helpful assistant.")
5650
.build();
5751

5852
// Call the agent
5953
Msg userMsg = Msg.builder()
60-
.role(MsgRole.USER)
61-
.content(TextBlock.builder().text("Hello!").build())
54+
.textContent("Hello!")
6255
.build();
6356

6457
Msg response = agent.call(userMsg).block();

0 commit comments

Comments
 (0)