Before configuring your application to connect to various Large Language Models like Azure OpenAI, Cohere, and Anthropic, you need to create a secret in AWS Secrets Manager that contains the required API keys and endpoints for these models.
Create a Secret for LLM Model API Connection in AWS Secrets Manager #
1- Navigate to AWS Secrets Manager: #
- Open the [AWS Management Console](https://aws.amazon.com/console/).
- Select Secrets Manager from the services menu.
2- Create a New Secret: #
- Choose Other type of secrets.
- In the key value pairs section, add the following keys and values for the respective LLM models you intend to connect with:
- – Azure_OPENAI_API_KEY: Your Azure OPENAI API KEY
- – Azure_OPENAI_API_ENDPOINT: Your Azure OPENAI API ENDPOINT
- – API_VERSION: API VERSION
- – COHERE_API_KEY: Your COHERE API KEY
- – GEMINI_API_KEY: Your GEMINI API KEY
- – AI21_API_KEY: Your AI21 API KEY
- – ANTHROPIC_API_KEY: Your ANTHROPIC API KEY
- – Llama_API_KEY: Your Llama API KEY
- – OPENAI_API_KEY: Your OPENAI API KEY
3- Name Your Secret: #
Give the secret a meaningful name, such as `llm_model_api_connection`, to easily identify the purpose of the stored credentials.
4- Store the Secret: #
Save the secret in Secrets Manager to securely store and retrieve the API keys and endpoints required for connecting to various LLM models.