Skip to content

Commit c4659fa

Browse files
committed
Fix example codes in docs
chatclient.adoc - Replaced javaCopySimpleLoggerAdvisor with SimpleLoggerAdvisor - Fixed typo in the multiline String for ChatClient example etl-pipeline.adoc - Fixed indent in the ParagraphPdfDocumentReader example imageclient.adoc - Fixed indent of override annotation in the ImageGeneration example testing.adoc - Added a semicolon to the Evaluator interface Signed-off-by: jitokim <[email protected]>
1 parent c02d136 commit c4659fa

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chatclient.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public class CustomerSupportAssistant {
450450
451451
this.chatClient = builder
452452
.defaultSystem("""
453-
You are a customer chat support agent of an airline named "Funnair".", Respond in a friendly,
453+
You are a customer chat support agent of an airline named "Funnair". Respond in a friendly,
454454
helpful, and joyful manner.
455455
456456
Before providing information about a booking or cancelling a booking, you MUST always
@@ -524,7 +524,7 @@ Example usage:
524524

525525
[source,java]
526526
----
527-
javaCopySimpleLoggerAdvisor customLogger = new SimpleLoggerAdvisor(
527+
SimpleLoggerAdvisor customLogger = new SimpleLoggerAdvisor(
528528
request -> "Custom request: " + request.userText,
529529
response -> "Custom response: " + response.getResult()
530530
);

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/etl-pipeline.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ class MyTextReader {
235235
MyTextReader(@Value("classpath:text-source.txt") Resource resource) {
236236
this.resource = resource;
237237
}
238+
238239
List<Document> loadText() {
239240
TextReader textReader = new TextReader(this.resource);
240241
textReader.getCustomMetadata().put("filename", "text-source.txt");
@@ -447,7 +448,7 @@ dependencies {
447448
@Component
448449
public class MyPagePdfDocumentReader {
449450
450-
List<Document> getDocsFromPdfwithCatalog() {
451+
List<Document> getDocsFromPdfWithCatalog() {
451452
452453
ParagraphPdfDocumentReader pdfReader = new ParagraphPdfDocumentReader("classpath:/sample1.pdf",
453454
PdfDocumentReaderConfig.builder()
@@ -458,7 +459,7 @@ public class MyPagePdfDocumentReader {
458459
.withPagesPerDocument(1)
459460
.build());
460461
461-
return pdfReader.read();
462+
return pdfReader.read();
462463
}
463464
}
464465
----

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/imageclient.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public class ImageGeneration implements ModelResult<Image> {
144144
145145
private Image image;
146146
147-
@Override
147+
@Override
148148
public Image getOutput() {...}
149149
150150
@Override

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/testing.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Spring AI interface for evaluating responses is `Evaluator`, defined as:
1212
----
1313
@FunctionalInterface
1414
public interface Evaluator {
15-
EvaluationResponse evaluate(EvaluationRequest evaluationRequest)
15+
EvaluationResponse evaluate(EvaluationRequest evaluationRequest);
1616
}
1717
----
1818

0 commit comments

Comments
 (0)