-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Azure Open AI nodes & credentials
Signed-off-by: Oleg Ivaniv <[email protected]>
- Loading branch information
1 parent
332dec3
commit bf02073
Showing
4 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...ns/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsazureopenai.md
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Embeddings Azure OpenAI | ||
description: Documentation for the Embeddings Azure OpenAI node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information. | ||
--- | ||
|
||
# Embeddings Azure OpenAI | ||
|
||
Use the Embeddings Azure OpenAI node to generate embeddings for a given text. | ||
|
||
On this page, you'll find the node parameters for the Embeddings Azure OpenAI node, and links to more resources. | ||
|
||
/// note | Credentials | ||
You can find authentication information for this node [here](/integrations/builtin/credentials/azureopenai/). | ||
/// | ||
|
||
/// note | Examples and templates | ||
For usage examples and templates to help you get started, refer to n8n's [OpenAI Embeddings integrations](https://n8n.io/integrations/embeddings-azure-openai/){:target=_blank .external-link} page. | ||
/// | ||
|
||
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md" | ||
|
||
|
||
## Node options | ||
|
||
* **Model (Deployment) Name**: The model(deployment) to use for generating embeddings. | ||
* **Batch Size**: maximum number of documents to send in each request. | ||
* **Strip New Lines**: whether to remove new line characters from input text. n8n enables this by default. | ||
* **Timeout**: maximum amount of time a request can take in seconds. Set to `-1` for no timeout. | ||
|
||
## Related resources | ||
|
||
View [example workflows and related content](https://n8n.io/integrations/embeddings-azure-openai/){:target=_blank .external-link} on n8n's website. | ||
|
||
Refer to [LangChains's OpenAI embeddings documentation](https://js.langchain.com/docs/modules/data_connection/text_embedding/integrations/azure_openai){:target=_blank .external-link} for more information about the service. | ||
|
||
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" | ||
--8<-- "_glossary/ai-glossary.md" |
45 changes: 45 additions & 0 deletions
45
...ations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatazureopenai.md
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: Azure OpenAI Chat Model | ||
description: Documentation for the OpenAI Chat Model node in n8n, a workflow automation platform. Includes details of operations and configuration, and links to examples and credentials information. | ||
--- | ||
|
||
# Azure OpenAI Chat Model | ||
|
||
Use the Azure OpenAI Chat Model node to use OpenAI's chat models with conversational agents. | ||
|
||
On this page, you'll find the node parameters for the Azure OpenAI Chat Model node, and links to more resources. | ||
|
||
/// note | Credentials | ||
You can find authentication information for this node [here](/integrations/builtin/credentials/azureopenai/). | ||
/// | ||
|
||
/// note | Examples and templates | ||
For usage examples and templates to help you get started, refer to n8n's [Azure OpenAI Chat Model integrations](https://n8n.io/integrations/azure-openai-chat-model/){:target=_blank .external-link} page. | ||
/// | ||
|
||
--8<-- "_snippets/integrations/builtin/cluster-nodes/sub-node-expression-resolution.md" | ||
|
||
## Node parameters | ||
|
||
**Model**: the model to use to generate the completion. | ||
|
||
## Node options | ||
|
||
* **Frequency Penalty**: increase this to reduce the chance of the model repeating itself. | ||
* **Maximum Number of Tokens**: the completion length, in characters. | ||
* **Response Format**: choose **Text** or **JSON**. **JSON** ensures the model returns valid JSON. | ||
* **Presence Penalty**: increase this to increase the chance of the model talking about new topics. | ||
* **Sampling Temperature**: controls the randomness of the sampling process. A higher temperature creates more diverse sampling, but increases the risk of hallucinations. | ||
* **Timeout**: maximum request time in milliseconds. | ||
* **Max Retries**: maximum number of times to retry a request. | ||
* **Top P**: use a lower value to ignore less probable options. | ||
|
||
|
||
## Related resources | ||
|
||
View [example workflows and related content](https://n8n.io/integrations/azure-openai-chat-model/){:target=_blank .external-link} on n8n's website. | ||
|
||
Refer to [LangChains's Azure OpenAI documentation](https://js.langchain.com/docs/integrations/chat/azure){:target=_blank .external-link} for more information about the service. | ||
|
||
--8<-- "_snippets/integrations/builtin/cluster-nodes/langchain-overview-link.md" | ||
--8<-- "_glossary/ai-glossary.md" |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: Azure OpenAI credentials | ||
description: Documentation for Azure OpenAI credentials. Use these credentials to authenticate OpenAI in n8n, a workflow automation platform. | ||
contentType: integration | ||
--- | ||
|
||
# Azure OpenAI credentials | ||
|
||
You can use these credentials to authenticate the following nodes with OpenAI. | ||
|
||
- [Chat Azure OpenAI](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatazureopenai) | ||
- [Embeddings Azure OpenAI](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsazureopenai) | ||
|
||
|
||
## Prerequisites | ||
|
||
Log-in to [Azure](https://portal.azure.com/#home/) account. | ||
|
||
## Using API Key | ||
To get the API key, follow the steps below: | ||
|
||
1. Open [Azure OpenAI service](https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAIHome) in Azure portal | ||
2. Click on **Create** button | ||
3. Enter the name of the resource, region and select the pricing tier. Input the resource name into the **Resource name** field in the credentials in n8n | ||
4. Click on **Next** button until you reach the **Review + create** step | ||
5. Click on **Create** button | ||
6. Once the resource is created, open it and click on **Keys and Endpoint** tab | ||
Check warning on line 27 in docs/integrations/builtin/credentials/azureopenai.md GitHub Actions / vale[vale] docs/integrations/builtin/credentials/azureopenai.md#L27
Raw output
|
||
7. Copy the **Key 1** value, this is your **API key** | ||
8. Click on **Model deployments** tab followed by **Manage Deployments** button to get to Azure OpenAI Studio | ||
9. Click on **Create new deployment** button, select the model, version and provide a name and click on **Create** button | ||
10. Once the model is deployed, use the name as **Deployment name** as the model for the Azure OpenAI nodes | ||
Check warning on line 31 in docs/integrations/builtin/credentials/azureopenai.md GitHub Actions / vale[vale] docs/integrations/builtin/credentials/azureopenai.md#L31
Raw output
|
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