fix docs build

This commit is contained in:
Mark Pollack
2023-10-06 08:25:33 +02:00
parent f37999f7c3
commit ed89e5fd9a
16 changed files with 259 additions and 10 deletions

View File

@@ -24,15 +24,15 @@
</fileSet>
</fileSets>
<files>
<!-- <file>-->
<!-- <source>target/asciidoc/index-single.pdf</source>-->
<!-- <destName>spring-ai-reference.pdf</destName>-->
<!-- <outputDirectory>reference/pdf</outputDirectory>-->
<!-- </file>-->
<!-- <file>-->
<!-- <source>target/asciidoc/index-single.epub</source>-->
<!-- <destName>spring-ai-reference.epub</destName>-->
<!-- <outputDirectory>reference/epub</outputDirectory>-->
<!-- </file>-->
<file>
<source>target/asciidoc/index-single.pdf</source>
<destName>spring-ai-reference.pdf</destName>
<outputDirectory>reference/pdf</outputDirectory>
</file>
<file>
<source>target/asciidoc/index-single.epub</source>
<destName>spring-ai-reference.epub</destName>
<outputDirectory>reference/epub</outputDirectory>
</file>
</files>
</assembly>

View File

@@ -0,0 +1,15 @@
:toc: left
:toclevels: 4
[[configureClient]]
== Configuring an `AiClient`
include::attributes.adoc[]
TBD
[[usingAiClient]]
=== Using AiClient
TBD

View File

@@ -0,0 +1 @@
:ai-asciidoc: ./

View File

@@ -0,0 +1,19 @@
:toc: left
:toclevels: 4
[[domainLanguageOfAi]]
== The Domain Language of AI
include::attributes.adoc[]
TBD
=== Prompt
TBD
==== AiClient
TBD

View File

@@ -0,0 +1,9 @@
'''
Mark Pollack
Copyright © 2023 VMware, Inc. All Rights Reserved.
Copies of this document may be made for your own use and for
distribution to others, provided that you do not charge any fee for such
copies and further provided that each copy contains this Copyright
Notice, whether distributed in print or electronically.

View File

@@ -0,0 +1,6 @@
[[glossary]]
[appendix]
== Glossary
[glossary]
=== Spring AI Glossary

View File

@@ -0,0 +1 @@
= Spring AI - Reference Documentation

View File

@@ -0,0 +1,20 @@
:doctype: book
:toc: left
:toclevels: 4
:sectnums:
include::attributes.adoc[]
include::header/index-header.adoc[]
include::toggle.adoc[]
include::spring-ai-intro.adoc[]
include::domain.adoc[]
include::prompt.adoc[]
include::aiclient.adoc[]
include::glossary.adoc[]

View File

@@ -0,0 +1,27 @@
include::attributes.adoc[]
include::header/index-header.adoc[]
// ======================================================================================
This documentation is also available
as a link:index-single.html[single HTML file] and as link:../pdf/spring-ai-reference.pdf[PDF]
and link:../epub/spring-ai-reference.epub[EPUB] documents.
The reference documentation is divided into several sections:
[horizontal]
<<spring-ai-intro.adoc#spring-ai-intro,Spring AI Introduction>> :: Background, usage
scenarios, and general guidelines.
<<domain.adoc#domainLanguageOfAi,The Domain Language of AI>> :: Core concepts and abstractions
of the AI domain language.
<<prompt.adoc#createPrompt,Creating a Prompt>> :: Prompt creation.
<<aiclient.adoc#configureClient,Configuring an AiClient>> :: AiClient configuration and execution.
The following appendices are available:
[horizontal]
<<glossary.adoc#glossary,Glossary>> :: Glossary of common terms, concepts, and vocabulary of
the AI domain.
include::footer/index-footer.adoc[]

View File

@@ -0,0 +1,76 @@
$(document).ready(function(){
var BATCH_LANGUAGES = ["java", "xml", "both"];
var $xmlButton = $("#xmlButton");
var $javaButton = $("#javaButton");
var $bothButton = $("#bothButton");
var $xmlContent = $("*.xmlContent");
var $xmlContentAll = $("*.xmlContent > *");
var $javaContent = $("*.javaContent");
var $javaContentAll = $("*.javaContent > *");
// Initial cookie handler. This part remembers the
// reader's choice and sets the toggle accordingly.
var lang = window.localStorage.getItem("docToggle");
if (BATCH_LANGUAGES.indexOf(lang) === -1) {
lang = "java";
$javaButton.prop("checked", true);
setJava();
} else {
if (lang === "xml") {
$xmlButton.prop("checked", true);
setXml();
}
if (lang === "java") {
$javaButton.prop("checked", true);
setJava();
}
if (lang === "both") {
$javaButton.prop("checked", true);
setBoth();
}
}
// Click handlers
$xmlButton.on("click", function() {
setXml();
});
$javaButton.on("click", function() {
setJava();
});
$bothButton.on("click", function() {
setBoth();
});
// Functions to do the work of handling the reader's choice, whether through a click
// or through a cookie. 3652 days is 10 years, give or take a leap day.
function setXml() {
$xmlContent.show();
$javaContent.hide();
$javaContentAll.addClass("js-toc-ignore");
$xmlContentAll.removeClass("js-toc-ignore");
window.dispatchEvent(new Event("tocRefresh"));
window.localStorage.setItem('docToggle', 'xml');
}
function setJava() {
$javaContent.show();
$xmlContent.hide();
$xmlContentAll.addClass("js-toc-ignore");
$javaContentAll.removeClass("js-toc-ignore");
window.dispatchEvent(new Event("tocRefresh"));
window.localStorage.setItem('docToggle', 'java');
}
function setBoth() {
$javaContent.show();
$xmlContent.show();
$javaContentAll.removeClass("js-toc-ignore");
$xmlContentAll.removeClass("js-toc-ignore");
window.dispatchEvent(new Event("tocRefresh"));
window.localStorage.setItem('docToggle', 'both');
}
});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
:toc: left
:toclevels: 4
[[createPrompt]]
== Creating a Prompt
include::attributes.adoc[]
TBD

View File

@@ -0,0 +1,47 @@
:toc: left
:toclevels: 4
include::attributes.adoc[]
ifdef::backend-spring-html[]
This documentation is also available
as link:index.html[multiple HTML files] and as link:../pdf/spring-ai-reference.pdf[PDF]
and link:../epub/spring-ai-reference.epub[EPUB] documents.
endif::[]
ifdef::backend-pdf[]
This documentation is also available
as link:index.html[multiple HTML files], a link:index-single.html[single HTML file],
and an link:../epub/spring-ai-reference.epub[EPUB] document.
endif::[]
ifdef::backend-epub3[]
This documentation is also available
as link:index.html[multiple HTML files], a link:index-single.html[single HTML file],
and a link:../pdf/spring-ai-reference.pdf[PDF] document.
endif::[]
[[spring-ai-intro]]
== Spring AI Introduction
TBD
[[springAiBackground]]
=== Background
TBD
[[springAiUsageScenarios]]
=== Usage Scenarios
TBD
==== Business Scenarios
TBD
==== Technical Objectives
TBD

View File

@@ -0,0 +1,15 @@
ifdef::backend-spring-html[]
+++
<div>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/js.cookie.js"></script>
<script type="text/javascript" src="js/DocumentToggle.js"></script>
<script type="text/javascript" src="js/Redirect.js"></script>
<div class="docToggle-button">
<input id="xmlButton" type="radio" name="docToggle" value="XML"><label for="xmlButton">XML</label>
<input id="javaButton" type="radio" name="docToggle" value="Java" checked><label for="javaButton">Java</label>
<input id="bothButton" type="radio" name="docToggle" value="Both" checked><label for="bothButton">Both</label>
</div>
</div>
+++
endif::backend-spring-html[]