# agent **Repository Path**: wangyongzhencode/agent ## Basic Information - **Project Name**: agent - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-07 - **Last Updated**: 2026-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Agent Backend Minimal Spring Boot backend project scaffolded for Java 21. ## Stack - Java 21 - Spring Boot 4.0.5 - Maven 3.9+ ## Run Make sure `JAVA_HOME` points to a JDK 21 installation, then run: ```bash mvn spring-boot:run ``` ## Build ```bash mvn test ``` ## API Start the application: ```bash mvn spring-boot:run ``` Call the chat endpoint: ```bash curl --location 'http://localhost:8080/api/v1/chat/completions' \ --header 'Content-Type: application/json' \ --data '{ "question": "Explain what a subnet is." }' ``` ## Demo Endpoints Chat: ```bash curl -X POST http://localhost:8080/chat/ask \ -H "Content-Type: application/json" \ -d '{ "question": "你是谁?" }' ``` Embedding: ```bash curl -X POST http://localhost:8080/embedding/vectorize \ -H "Content-Type: application/json" \ -d '{ "text": "衣服的质量杠杠的,很漂亮,不枉我等了这么久啊,喜欢,以后还来这里买" }' ``` Vector Search: ```bash curl -X POST http://localhost:8080/embedding/search \ -H "Content-Type: application/json" \ -d '{ "text": "这件衣服质量很好", "topK": 5 }' ``` ## PostgreSQL Docker ```bash cd /Users/wangyongzhen/agent/docker/postgres chmod +x up.sh ./up.sh ```