# LangChain4j AI Sample Project

This is a sample AI application project based on LangChain4j, featuring multiple modules that demonstrate how to develop using large language models.

## Project Structure

The project consists of multiple modules, each demonstrating a different feature:

- `langchain4j-ai-helloworld`: A beginner example showing how to perform simple conversations using a large language model.
- `langchain4j-ai-image`: An image processing example demonstrating the use of image models.
- `langchain4j-ai-low-high-api`: Demonstrates the use of low-level and high-level APIs.
- `langchain4j-ai-memory`: A memory management example showing how to use chat memory.
- `langchain4j-ai-model-params`: An example of configuring model parameters.
- `langchain4j-ai-mongodb`: An example of storing chat memory using MongoDB.
- `langchain4j-ai-multimode`: An example of calling multiple models.
- `langchain4j-ai-pinecone`: An example of storing embeddings using Pinecone.
- `langchain4j-ai-prompt`: An example of using prompt templates.
- `langchain4j-ai-rag`: An RAG (Retrieval-Augmented Generation) example.
- `langchain4j-ai-stream`: An example of handling streaming responses.
- `langchain4j-ai-tools`: An example of integrating tools, such as weather queries.
- `langchain4j-ai-xiaoai-agent`: A XiaoAI intelligent assistant example integrating multiple features.

## Installation

Ensure you have Java and Maven installed. Then clone the repository and build the project:

```bash
git clone https://gitee.com/pu13398199549/langchain4j-ai-java.git
cd langchain4j-ai-java
mvn clean install
```

## Usage

Each module can be run independently. For example, to run the `langchain4j-ai-helloworld` module:

```bash
cd langchain4j-ai-helloworld
mvn spring-boot:run
```

Visit `http://localhost:8080/langchain4j/hello` to view the sample output.

## Contribution

Contributions and suggestions are welcome. Please submit a Pull Request or Issue.

## License

This project is licensed under the MIT License. See the LICENSE file for details.