From 8b0ad1a183efca97fd420a6fb8124b76cf1225b1 Mon Sep 17 00:00:00 2001 From: Mark Pollack Date: Sun, 20 Aug 2023 21:49:47 -0700 Subject: [PATCH] add getting started --- .../modules/ROOT/pages/getting-started.adoc | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc b/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc index 34a4eaa6e..22e9645c5 100644 --- a/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc +++ b/spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc @@ -1,2 +1,46 @@ = Getting Started +== API Keys + +=== OpenAI + +Create an account at link:https://platform.openai.com/signup[OpenAI Signup] and generate the token at link:https://platform.openai.com/account/api-keys[API Keys]. + +The Spring AI project defines a configuration property named `spring.ai.openai.api-key` that you should set to the value of the `API Key` obtained from `openai.com`. + +Exporting an environment variable is one way to set that configuration property. + +[source,shell] +---- +export SPRING_AI_OPENAI_API_KEY= +---- + +=== Azure OpenAI +Obtain your Azure OpenAI `endpoint` and `api-key` from the Azure OpenAI Service section on link:https://portal.azure.com[Azure Portal]. + +The Spring AI project defines a configuration property named `spring.ai.azure.openai.api-key` that you should set to the value of the `API Key` obtained from Azure. + +Exporting environment variables is one way to set these configuration properties. + +[source,shell] +---- +export SPRING_AI_AZURE_OPENAI_API_KEY= +export SPRING_AI_AZURE_OPENAI_ENDPOINT= +---- + +== Sample Projects + +You can clone these projects on GitHub to get started. + +=== OpenAI + +* https://github.com/rd-1-2022/ai-openai-helloworld + +=== Azure OpenAI + +* https://github.com/rd-1-2022/ai-azure-openai-helloworld +* https://github.com/rd-1-2022/ai-azure-stuff-prompt +* https://github.com/rd-1-2022/ai-azure-prompt-template +* https://github.com/rd-1-2022/ai-azure-openai-prompt-roles +* https://github.com/rd-1-2022/ai-azure-retrieval-augmented-generation +