You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-bindings-openai-embeddingsstore-output.md
+47-58Lines changed: 47 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
-
title: Azure OpenAI embeddings store output binding for Azure Functions
2
+
title: Azure OpenAI Embeddings Store Output Binding for Azure Functions
3
3
description: Learn how to use the Azure OpenAI embeddings store output binding to write searchable content to a semantic document store during function execution in Azure Functions.
:::code language="typescript" source="~/functions-openai-extension/samples/{{link to the correct sample.ts}}" range="{{named is better than range}}":::
66
+
This example writes an HTTP input stream to a semantic document store at the provided URL.
@@ -107,14 +98,13 @@ Apply the `EmbeddingsStoreOutput` attribute to define an embeddings store output
107
98
108
99
| Parameter | Description |
109
100
| --------- | ----------- |
101
+
|**Input**| The input string for which to generate embeddings. |
102
+
|**Model**|_Optional_. The ID of the model to use, which defaults to `text-embedding-ada-002`. You shouldn't change the model for an existing database. For more information, see [Usage](#usage). |
103
+
|**MaxChunkLength**|_Optional_. The maximum number of characters used for chunking the input. For more information, see [Usage](#usage).|
104
+
|**MaxOverlap**|_Optional_. Gets or sets the maximum number of characters to overlap between chunks.|
105
+
|**InputType**|_Optional_. Gets the type of the input. |
110
106
|**ConnectionName**| The name of an app setting or environment variable that contains the connection string value. This property supports binding expressions. |
111
107
|**Collection**| The name of the collection or table or index to search. This property supports binding expressions.|
112
-
|**Query**| Gets or sets the semantic query text to use for searching. This property is only used for the semantic search input binding. This property supports binding expressions.|
113
-
|**EmbeddingsModel**| Gets or sets the ID of the model to use for embeddings. The default value is `text-embedding-3-small`. This property supports binding expressions.|
114
-
|**ChatModel**| Gets or sets the name of the Large Language Model to invoke for chat responses. The default value is `gpt-3.5-turbo`. This property supports binding expressions.|
115
-
|**SystemPrompt**|_Optional_. Gets or sets the system prompt to use for prompting the large language model. The system prompt is appended with knowledge that is fetched as a result of the `Query`. The combined prompt is then sent to the OpenAI Chat API. This property supports binding expressions.|
116
-
|**MaxKnowledgeCount**|_Optional_. Gets or sets the number of knowledge items to inject into the `SystemPrompt`.|
117
-
118
108
119
109
::: zone-end
120
110
::: zone pivot="programming-language-java"
@@ -125,14 +115,13 @@ The `EmbeddingsStoreOutput` annotation enables you to define a embeddings store
125
115
| Element | Description |
126
116
| ------- | ----------- |
127
117
|**name**| Gets or sets the name of the output binding. |
118
+
|**input**| The input string for which to generate embeddings. |
119
+
|**model**|_Optional_. The ID of the model to use, which defaults to `text-embedding-ada-002`. You shouldn't change the model for an existing database. For more information, see [Usage](#usage). |
120
+
|**maxChunkLength**|_Optional_. The maximum number of characters used for chunking the input. For more information, see [Usage](#usage).|
121
+
|**maxOverlap**|_Optional_. Gets or sets the maximum number of characters to overlap between chunks.|
122
+
|**inputType**|_Optional_. Gets the type of the input. |
128
123
|**connectionName**| The name of an app setting or environment variable that contains the connection string value. This property supports binding expressions. |
129
124
|**collection**| The name of the collection or table or index to search. This property supports binding expressions.|
130
-
|**query**| Gets or sets the semantic query text to use for searching. This property is only used for the semantic search input binding. This property supports binding expressions.|
131
-
|**embeddingsModel**| Gets or sets the ID of the model to use for embeddings. The default value is `text-embedding-3-small`. This property supports binding expressions.|
132
-
|**chatModel**| Gets or sets the name of the Large Language Model to invoke for chat responses. The default value is `gpt-3.5-turbo`. This property supports binding expressions.|
133
-
|**systemPrompt**|_Optional_. Gets or sets the system prompt to use for prompting the large language model. The system prompt is appended with knowledge that is fetched as a result of the `Query`. The combined prompt is then sent to the OpenAI Chat API. This property supports binding expressions.|
134
-
|**maxKnowledgeCount**|_Optional_. Gets or sets the number of knowledge items to inject into the `SystemPrompt`.|
135
-
136
125
137
126
::: zone-end
138
127
::: zone pivot="programming-language-python"
@@ -143,13 +132,13 @@ During the preview, define the output binding as a `generic_output_binding` bind
143
132
|Parameter | Description |
144
133
|---------|-------------|
145
134
|**arg_name**| The name of the variable that represents the binding parameter. |
135
+
|**input**| The input string for which to generate embeddings. |
136
+
|**model**|_Optional_. The ID of the model to use, which defaults to `text-embedding-ada-002`. You shouldn't change the model for an existing database. For more information, see [Usage](#usage). |
137
+
|**maxChunkLength**|_Optional_. The maximum number of characters used for chunking the input. For more information, see [Usage](#usage).|
138
+
|**max_overlap**|_Optional_. Gets or sets the maximum number of characters to overlap between chunks.|
139
+
|**input_type**| Gets the type of the input. |
146
140
|**connection_name**| The name of an app setting or environment variable that contains the connection string value. This property supports binding expressions. |
147
141
|**collection**| The name of the collection or table or index to search. This property supports binding expressions.|
148
-
|**query**| Gets or sets the semantic query text to use for searching. This property is only used for the semantic search input binding. This property supports binding expressions.|
149
-
|**embeddings_model**| Gets or sets the ID of the model to use for embeddings. The default value is `text-embedding-3-small`. This property supports binding expressions.|
150
-
|**chat_model**| Gets or sets the name of the Large Language Model to invoke for chat responses. The default value is `gpt-3.5-turbo`. This property supports binding expressions.|
151
-
|**system_prompt**|_Optional_. Gets or sets the system prompt to use for prompting the large language model. The system prompt is appended with knowledge that is fetched as a result of the `Query`. The combined prompt is then sent to the OpenAI Chat API. This property supports binding expressions.|
152
-
|**max_knowledge_count**|_Optional_. Gets or sets the number of knowledge items to inject into the `SystemPrompt`.|
153
142
154
143
::: zone-end
155
144
::: zone pivot="programming-language-powershell"
@@ -162,13 +151,13 @@ The binding supports these configuration properties that you set in the function
162
151
|**type**| Must be `embeddingsStore`. |
163
152
|**direction**| Must be `out`. |
164
153
|**name**| The name of the output binding. |
154
+
|**input**| The input string for which to generate embeddings. |
155
+
|**model**|_Optional_. The ID of the model to use, which defaults to `text-embedding-ada-002`. You shouldn't change the model for an existing database. For more information, see [Usage](#usage). |
156
+
|**maxChunkLength**|_Optional_. The maximum number of characters used for chunking the input. For more information, see [Usage](#usage).|
157
+
|**maxOverlap**|_Optional_. Gets or sets the maximum number of characters to overlap between chunks.|
158
+
|**inputType**|_Optional_. Gets the type of the input. |
165
159
|**connectionName**| The name of an app setting or environment variable that contains the connection string value. This property supports binding expressions. |
166
160
|**collection**| The name of the collection or table or index to search. This property supports binding expressions.|
167
-
|**query**| Gets or sets the semantic query text to use for searching. This property is only used for the semantic search input binding. This property supports binding expressions.|
168
-
|**embeddingsModel**| Gets or sets the ID of the model to use for embeddings. The default value is `text-embedding-3-small`. This property supports binding expressions.|
169
-
|**chatModel**| Gets or sets the name of the Large Language Model to invoke for chat responses. The default value is `gpt-3.5-turbo`. This property supports binding expressions.|
170
-
|**systemPrompt**|_Optional_. Gets or sets the system prompt to use for prompting the large language model. The system prompt is appended with knowledge that is fetched as a result of the `Query`. The combined prompt is then sent to the OpenAI Chat API. This property supports binding expressions.|
171
-
|**maxKnowledgeCount**|_Optional_. Gets or sets the number of knowledge items to inject into the `SystemPrompt`.|
172
161
173
162
::: zone-end
174
163
::: zone pivot="programming-language-javascript,programming-language-typescript"
@@ -178,13 +167,13 @@ The binding supports these properties, which are defined in your code:
178
167
179
168
|Property | Description |
180
169
|-----------------------|-------------|
170
+
|**input**| The input string for which to generate embeddings. |
171
+
|**model**|_Optional_. The ID of the model to use, which defaults to `text-embedding-ada-002`. You shouldn't change the model for an existing database. For more information, see [Usage](#usage). |
172
+
|**maxChunkLength**|_Optional_. The maximum number of characters used for chunking the input. For more information, see [Usage](#usage).|
173
+
|**maxOverlap**|_Optional_. Gets or sets the maximum number of characters to overlap between chunks.|
174
+
|**inputType**|_Optional_. Gets the type of the input. |
181
175
|**connectionName**| The name of an app setting or environment variable that contains the connection string value. This property supports binding expressions. |
182
176
|**collection**| The name of the collection or table or index to search. This property supports binding expressions.|
183
-
|**query**| Gets or sets the semantic query text to use for searching. This property is only used for the semantic search input binding. This property supports binding expressions.|
184
-
|**embeddingsModel**| Gets or sets the ID of the model to use for embeddings. The default value is `text-embedding-3-small`. This property supports binding expressions.|
185
-
|**chatModel**| Gets or sets the name of the Large Language Model to invoke for chat responses. The default value is `gpt-3.5-turbo`. This property supports binding expressions.|
186
-
|**systemPrompt**|_Optional_. Gets or sets the system prompt to use for prompting the large language model. The system prompt is appended with knowledge that is fetched as a result of the `Query`. The combined prompt is then sent to the OpenAI Chat API. This property supports binding expressions.|
187
-
|**maxKnowledgeCount**|_Optional_. Gets or sets the number of knowledge items to inject into the `SystemPrompt`.|
0 commit comments