Skip to content

Commit 3a26abe

Browse files
committed
feat: add summary for the books found.
1 parent 1bb5bd0 commit 3a26abe

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The project uses Spring Boot with Spring AI to question a image database that us
2121
The project uses Spring AI to turn questions with a LLMs into Sql queries and display the result in the frontend. Based on metadata that is provided for the relational dataset the LLM is able to create embeddings for the metadata of the tables and columns. The project also creates embeddings for the content of certain columns to be able to decide if the column should be used as join in the Sql query. With that embedding metadata the LLM is able to turn a question in a reasonable Sql query and display the result in the frontend. The frontend uses a Angular Material Table with a flexible amount of columns and rows.
2222

2323
### Function calls for book search
24-
The project uses Spring AI to turn questions about books into a rest function call to the OpenLibrary Api. It uses the Ollama Mixtral model to take the parameters from the question and turn them in a Json format that can be used to call the Api.
24+
The project uses Spring AI to turn questions about books into a rest function call to the OpenLibrary Api. It uses the Llama3.1 model and the Spring AI function calling api. The api response is used to create the response.
2525

2626
### Generating code
2727
The project uses Spring AI to generate test classes. To do that the class to test is provided and the classes the class to test depends on. A test example class can also be provided. The ollama based AI/LLM then gets a prompt with all the information and generates a draft of the source of the test class.
@@ -42,7 +42,7 @@ The project uses Spring AI to generate summaries of books. To generate the summa
4242
2. It uploads new documents and creates the embeddings.
4343
3. It provides a chat box and shows the AI answers based on the nearest document with a link.
4444
4. It displays the result of the Sql query based on the question.
45-
5. It displays the results of the rest api with parameters based on to question.
45+
5. It displays the responses based on the results of the api requested based on the user question.
4646
6. It displays the results of the questions to the image database.
4747
7. It generates tests for sources in public Github repositories
4848
8. It generates book summaries of epub of pdf books.

backend/src/main/java/ch/xxx/aidoclibchat/usecase/service/FunctionService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ public class FunctionService {
2424
private static final Logger LOGGER = LoggerFactory.getLogger(FunctionService.class);
2525
private final ChatClient chatClient;
2626
private final String promptStr = """
27-
Make sure to have all the parameters when calling a function.
28-
If a parameter is missing ask the user for the parameter.
27+
Make sure to have a parameter when calling a function.
28+
If no parameter is provided ask the user for the parameter.
29+
Create a summary for each book based on the function response subject.
2930
3031
User Query:
3132
%s

0 commit comments

Comments
 (0)