-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5c0ede
commit 8b0ad1a
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
spring-ai-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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=<INSERT KEY HERE> | ||
---- | ||
|
||
=== 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=<INSERT KEY HERE> | ||
export SPRING_AI_AZURE_OPENAI_ENDPOINT=<INSERT ENDPOINT URL HERE> | ||
---- | ||
|
||
== 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 | ||
|