Is there an example of how to setup this http call properly? The documentation I find is not relative to the newer versions of PVA. Also, Automate "complete text..." does not work as it points to 3.5.
I'm sending a string to Chatgpt 4.0 that I have and expect a return answer. It passes authentication then fails. See comps.
Can use assign the payload to a variable before invoking an HTTP request and validate it was populated correctly?
Does anyone can help me with this? Or has any idea why this is hapenning? I have a similiar problem
Your help will be much appreciated 😊
I'm attempting to send an HTTP request to OpenAI's service. It seems to function correctly overall. However, when I dynamically assign the content of the user field in the JSON payload to a variable where the question is stored, the response indicates that the information isn't found in the retrieved data. Strangely, if I manually input the same question into the content field, I receive the correct response.
@HenryJammes , would you happen to have any clue why this is hapenning?
Thanks everyone
This is the code:
kind: AdaptiveDialog
beginDialog:
kind: OnUnknownIntent
id: main
priority: -1
actions:
- kind: SetVariable
id: setVariable_J8onVi
variable: Topic.UserQuestion
value: =System.Activity.Text
- kind: HttpRequestAction
id: vdrcdy
method: Post
url: https://ai-XXXXXXXXXXXXXXXXX.openai.azure.com/openai/deployments/gpt-35-turbo-16k/extensions/chat/completions?api-version=2023-06-01-preview
headers:
api-key: XXXXX-XXX-XXXXX-XXXXX-XXXX
body:
kind: JsonRequestContent
content:
kind: ValueExpression
literalValue:
dataSources:
- parameters:
endpoint: https://xxxx-xx-xxx-xx.search.windows.net
fieldsMapping:
contentFields:
- Value: content
contentFieldsSeparator: |
filepathField: metadata_spo_item_name
titleField: Name
urlField:
vectorFields:
filter:
indexName: sharepoint-index
inScope: true
key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
queryType: simple
roleInformation: You are an AI assistant and you are part of our organization. You need to be polite when you give the answers. The information you will be giving is from an internal SharePoint.
semanticConfiguration: default
strictness: 3
topNDocuments: 5
type: AzureCognitiveSearch
deployment: gpt-35-turbo-16k
max_tokens: 800
messages:
- content: You are an AI assistant and you are part of our organization. You need to be polite when you give the answers. The information you will be giving is from an internal SharePoint.
role: system
- content: ${Topic.UserQuestion}
role: user
stop:
stream: false
temperature: 0
top_p: 1
response: Topic.Response
responseSchema:
kind: Record
properties:
choices:
type:
kind: Table
properties:
index: Number
messages:
type:
kind: Table
properties:
content: String
end_turn: Boolean
index: Number
role: String
created: Number
id: String
model: String
object: String
usage:
type:
kind: Record
properties:
completion_tokens: Number
prompt_tokens: Number
total_tokens: Number
- kind: SendActivity
id: sendActivity_CUSi4i
activity: "{Last(Last(Topic.Response.choices).messages).content}"
- kind: EndDialog
id: a1Vse4