# springboot-localai-langchain4j **Repository Path**: rengm/springboot-localai-langchain4j ## Basic Information - **Project Name**: springboot-localai-langchain4j - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-01-06 - **Last Updated**: 2025-01-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Spring Boot, LangChain4J and LocalAI This demo spring boot application show the capabilities of LocalAI for code translation. ## Setup Local: Install & Run LocalAI using below docker command: * docker run -p 8080:8080 --name local-ai -ti localai/localai:latest-aio-cpu To stop the docker instance write command: * docker stop local-ai ## Add LangChain4J dependency to maven: dev.langchain4j langchain4j-local-ai 0.31.0 ## Run Spring Boot Application: mvn spring-boot:run -Dserver.port=8081 ## curl the sample java source file for conversion: curl --location 'http://localhost:8081/api/files/translate' \ --form 'file=@"C:JavaProgram.java"' \ --form 'prompt="Convert Java source code to C#."'