Browse Source

目录名称调整

fengyanglei 4 tháng trước cách đây
mục cha
commit
3eda9bd23e

+ 2 - 1
chatbot/README.md → chat/README.md

@@ -30,9 +30,10 @@ mvn spring-boot:run
 
 3. Chat with ChatBot.
 Open the browser and visit [http://localhost:8080/chatui/index.html](http://localhost:8080/chatui/index.html) to chat with the ChatBot.
+* 菲波那切数列第6个数是多少?
 
 <p align="center">
-    <img src="../../docs/imgs/chatbot-chat-ui.gif" alt="chatbot-ui" style="max-width: 740px; height: 508px" />
+    <img src="../docs/imgs/chatbot-chat-ui.gif" alt="chatbot-ui" style="max-width: 740px; height: 508px" />
 </p>
 
 ## More Examples

+ 2 - 2
chatbot/pom.xml → chat/pom.xml

@@ -25,9 +25,9 @@
 	</parent>
 
 	<groupId>com.baoshi.ai</groupId>
-	<artifactId>chatbot</artifactId>
+	<artifactId>chat</artifactId>
 	<version>0.0.1-SNAPSHOT</version>
-	<name>AI::ChatBot</name>
+	<name>AI::Chat</name>
 
 	<properties>
 		<java.version>17</java.version>

+ 1 - 6
chatbot/src/main/java/com/baoshi/ai/chatbot/AgentStaticLoader.java → chat/src/main/java/com/baoshi/ai/chat/AgentStaticLoader.java

@@ -14,19 +14,14 @@
  * limitations under the License.
  */
 
-package com.baoshi.ai.chatbot;
+package com.baoshi.ai.chat;
 
 import com.alibaba.cloud.ai.agent.studio.loader.AgentLoader;
 import com.alibaba.cloud.ai.graph.GraphRepresentation;
 import com.alibaba.cloud.ai.graph.agent.BaseAgent;
-import com.alibaba.cloud.ai.graph.agent.ReactAgent;
-
-import org.springframework.ai.tool.ToolCallback;
-import org.springframework.ai.tool.ToolCallbackProvider;
 
 import org.springframework.stereotype.Component;
 
-import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;

+ 1 - 5
chatbot/src/main/java/com/baoshi/ai/chatbot/ChatbotAgent.java → chat/src/main/java/com/baoshi/ai/chat/ChatbotAgent.java

@@ -13,14 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.baoshi.ai.chatbot;
+package com.baoshi.ai.chat;
 
 import com.alibaba.cloud.ai.graph.agent.ReactAgent;
 import com.alibaba.cloud.ai.graph.agent.tools.ShellTool;
 import com.alibaba.cloud.ai.graph.agent.extension.tools.filesystem.ReadFileTool;
 
 import org.springframework.ai.chat.model.ChatModel;
-import org.springframework.ai.chat.model.ToolContext;
 import org.springframework.ai.tool.ToolCallback;
 import org.springframework.ai.tool.function.FunctionToolCallback;
 
@@ -29,9 +28,6 @@ import org.springframework.context.annotation.Configuration;
 
 import java.io.File;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyDescription;
-
 @Configuration
 public class ChatbotAgent {
 

+ 1 - 1
chatbot/src/main/java/com/baoshi/ai/chatbot/ChatbotApplication.java → chat/src/main/java/com/baoshi/ai/chat/ChatbotApplication.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.baoshi.ai.chatbot;
+package com.baoshi.ai.chat;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;

+ 1 - 1
chatbot/src/main/java/com/baoshi/ai/chatbot/PythonTool.java → chat/src/main/java/com/baoshi/ai/chat/PythonTool.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.baoshi.ai.chatbot;
+package com.baoshi.ai.chat;
 
 import org.springframework.ai.chat.model.ToolContext;
 import org.springframework.ai.tool.ToolCallback;

+ 2 - 2
chatbot/src/main/resources/application.properties → chat/src/main/resources/application.properties

@@ -1,5 +1,5 @@
-spring.application.name=baoshi-ai-chatbot
-#server.servlet.context-path=/api/ai/chatbot
+spring.application.name=baoshi-ai-chat
+server.servlet.context-path=/api/ai-chat
 
 # nacos
 spring.cloud.nacos.config.server-addr=nacos-server-addr:8848

+ 1 - 1
chatbot/src/test/java/com/baoshi/ai/chatbot/ChatbotApplicationTests.java → chat/src/test/java/com/baoshi/ai/chat/ChatbotApplicationTests.java

@@ -1,4 +1,4 @@
-package com.baoshi.ai.chatbot;
+package com.baoshi.ai.chat;
 
 import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;

BIN
docs/imgs/chatbot-chat-ui.gif