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
Updated FunctionRequest and ApiAgent classes to include a new property for sending API responses to AI, and modified related methods and UI elements accordingly.
Copy file name to clipboardexpand all lines: OpenAI_API/Functions/FunctionRequest.cs
+1-1
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ public class Function
49
49
/// Setting strict to true will ensure function calls reliably adhere to the function schema, instead of being best effort. We recommend always enabling strict mode.
Copy file name to clipboardexpand all lines: README.md
+5
Original file line number
Diff line number
Diff line change
@@ -198,6 +198,7 @@ Follow these steps to make the most of this feature:
198
198
-**Identification**: Enter a unique name to identify the API.
199
199
-**Base URL**: Enter the base URL of the API.
200
200
-**Key/Values**: Define key-value pairs to be included in API requests, or to replace the key/values defined by the AI. Ideal for inserting authentication/authorization key/values, or to ensure that all calls have a certain key/value.
201
+
-**Send Responses to AI**: If checked, all API responses will be forwarded to the AI so it can process and retain them in its context. Otherwise, the AI will only receive the HTTP status, and the responses will be displayed directly in the chat. This option is ideal if you want to protect data and save tokens.
201
202
-**Definition**: Enter the API's definition (e.g., OpenAPI, Swagger, SOAP) here. This allows the AI to understand the API's structure and capabilities for making requests.
202
203
203
204
2.**Access the 'API' icon in Turbo Chat**
@@ -215,6 +216,10 @@ Follow these steps to make the most of this feature:
215
216
216
217
![image]()
217
218
219
+
Or if you prefer that the AI only receives the status code from the APIs, without the actual responses (after disabled the "Send Responses to AI" parameter):
220
+
221
+
![image]()
222
+
218
223
5.**Important considerations**
219
224
- The AI never has knowledge of the keys/values configured through the options, so they are ideal for authentication tokens.
/// <param name="function">The function result containing the API call details.</param>
103
+
/// <param name="logRequestAndResponse">A boolean indicating whether to log the request and response.</param>
104
+
/// <returns>A tuple where the first value refers to the response to be sent to the AI, and the second value refers to the API response to be displayed in the chat, when applicable.</returns>
<Image Grid.Row="2" Grid.Column="4"VerticalAlignment="Center"ToolTip="Enter the base URL of the API."Source="pack://application:,,,/VisualChatGPTStudio;component/Resources/information.png" />
64
64
65
+
<!-- SEND RESPONSES TO AI -->
66
+
<LabelContent="Send Responses to AI:" Grid.Row="4" Grid.Column="0" />
<ImageToolTip="If checked, all API responses will be forwarded to the AI so it can process and retain them in its context. Otherwise, the AI will only receive the HTTP status, and the responses will be displayed directly in the chat. This option is ideal if you want to protect data and save tokens."Source="pack://application:,,,/VisualChatGPTStudio;component/Resources/information.png" />
74
+
</StackPanel>
75
+
65
76
<!-- TAGs -->
66
77
<Buttonx:Name="btnInsertTag"Content="Insert a Key/Value"Click="btnInsertTag_Click" Grid.Row="4" Grid.Column="2"HorizontalAlignment="Right"Width="150" />
0 commit comments