diff --git a/agents-flex-llm/agents-flex-llm-gitee/src/test/java/com/agentsflex/llm/gitee/GiteeAITest.java b/agents-flex-llm/agents-flex-llm-gitee/src/test/java/com/agentsflex/llm/gitee/GiteeAITest.java new file mode 100644 index 0000000..e3624e1 --- /dev/null +++ b/agents-flex-llm/agents-flex-llm-gitee/src/test/java/com/agentsflex/llm/gitee/GiteeAITest.java @@ -0,0 +1,32 @@ +package com.agentsflex.llm.gitee; + +import com.agentsflex.core.llm.response.AiMessageResponse; +import com.agentsflex.core.prompt.FunctionPrompt; +import org.junit.Test; + +public class GiteeAITest { + + public static void main(String[] args) { + GiteeAiLlmConfig config = new GiteeAiLlmConfig(); + config.setApiKey("your-api-key"); + + GiteeAiLlm llm = new GiteeAiLlm(config); + String result = llm.chat("你好"); + System.out.println(result); + } + + @Test + public void testFunctionCalling() { + GiteeAiLlmConfig config = new GiteeAiLlmConfig(); + config.setApiKey("your-api-key"); + config.setModel("Qwen2.5-72B-Instruct"); + + GiteeAiLlm llm = new GiteeAiLlm(config); + + + FunctionPrompt prompt = new FunctionPrompt("What's the weather like in Beijing?", WeatherFunctions.class); + AiMessageResponse response = llm.chat(prompt); + + System.out.println(response.callFunctions()); + } +}