mirror of
https://gitee.com/agents-flex/agents-flex.git
synced 2024-11-29 18:38:17 +08:00
feat: init
This commit is contained in:
parent
59f843d0c9
commit
679157d8e7
22
readme.md
22
readme.md
@ -26,6 +26,28 @@ use OpenAi LLM:
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
use Qwen LLM:
|
||||
|
||||
```java
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
|
||||
QwenLlmConfig config = new QwenLlmConfig();
|
||||
config.setApiKey("sk-28a6be3236****");
|
||||
config.setModel("qwen-turbo");
|
||||
|
||||
Llm llm = new QwenLlm(config);
|
||||
|
||||
Prompt prompt = new SimplePrompt("Please write a story about a little rabbit defeating a big bad wolf");
|
||||
llm.chat(prompt, (llmInstance, message) -> {
|
||||
System.out.println("--->" + message.getContent());
|
||||
});
|
||||
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
use SparkAi LLM:
|
||||
|
||||
```java
|
||||
|
22
readme_zh.md
22
readme_zh.md
@ -27,6 +27,28 @@
|
||||
}
|
||||
```
|
||||
|
||||
使用 “通义千问” 大语言模型:
|
||||
|
||||
```java
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
|
||||
QwenLlmConfig config = new QwenLlmConfig();
|
||||
config.setApiKey("sk-28a6be3236****");
|
||||
config.setModel("qwen-turbo");
|
||||
|
||||
Llm llm = new QwenLlm(config);
|
||||
|
||||
Prompt prompt = new SimplePrompt("请写一个关于小兔子战胜大灰狼的故事。");
|
||||
llm.chat(prompt, (llmInstance, message) -> {
|
||||
System.out.println("--->" + message.getContent());
|
||||
});
|
||||
|
||||
Thread.sleep(10000);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
使用 “讯飞星火” 大语言模型:
|
||||
|
||||
```java
|
||||
|
Loading…
Reference in New Issue
Block a user