初始化
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.easyagents;
|
||||
|
||||
import com.easyagents.llm.openai.OpenAIChatConfig;
|
||||
import com.easyagents.llm.openai.OpenAIChatModel;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
|
||||
OpenAIChatModel chatModel = OpenAIChatConfig.builder()
|
||||
.provider("GiteeAI")
|
||||
.endpoint("https://ai.gitee.com")
|
||||
.requestPath("/v1/chat/completions")
|
||||
.apiKey("P****QL7D12")
|
||||
.model("Qwen3-32B")
|
||||
.buildModel();
|
||||
|
||||
String output = chatModel.chat("如何才能更幽默?");
|
||||
System.out.println(output);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user