Skip to content

zhang-perry/caicai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caicai Spring AI Exploring Project Getting Started

A Spring AI Exploring Project[Caicai]. Functions include:

  1. Support Ollama Chat, using the Spring AI Chat SDK.
  2. Support RAG(Retrieval Augmented Generation), able to retrieve and generate content based on user queries and input documents.
  3. TESTS: Embedding, Vector Store, ETL pipeline

TODO:

  1. Image
  2. Audio
  3. Function Calling
  4. Multimodality
  5. User Interface
  6. Evaluation Testing

1. Project preparation

Basic development environment preparation

Environment Version
java OpenJDK version 21.0.1
gradle Gradle 8.6
pgvector pgvector:pg16
ollama 0.1.38
httpie 3.2.2

2. Running Models

2.1 for chat

ollama run llama3

OR

ollama run wangshenzhi/llama3-8b-chinese-chat-ollama-q8:latest

2.2 for text embedding

ollama rum nomic-embed-text

3. Running the Spring Boot Application

./gradlew bootRun

4、Retrieval Augmented Generation(RGA)

4.1 Uploading documents

http -f POST :8080/rga/upload file@~/Desktop/upload_test.txt 

4.2 Searching documents

http :8080/rga/search keyword=="Caicai AI test"

4.3 Chatting with documents

http :8080/rga/chat message=="Caicai AI test"

5. Chat(Default)

http :8080/chat message=="Tell me a funny story."
http :8080/chat/generic-options message=="what is spring AI? Give a short answer."
http :8080/chat/generic-options message=="what is spring AI? Give a short answer."

6. API Document

API DOC: http://localhost:8080/swagger-ui/index.html

Releases

No releases published

Packages

No packages published

Languages