@J Rippon I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others (Opens in new window or tab)", I'll repost your solution in case you'd like to "Accept (Opens in new window or tab)" the answer.
Issue: You were able to successfully get data when using a general dataset but after introducing your own data, you received the error, 'The extensions chat completions operation must have at least one extension.'"
Solution: "For anyone interested my message body was wrong when referencing the data source, and the below fixed it."
$openAibody = [ordered]@{
"messages" = @(
@{
"role" = "user"
"content" = $messageTextString
}
@{
"role" = "system"
"content" = $systemMessage
}
)
"max_tokens" = 500
"temperature" = 0.7
"top_p" = 0.95
"dataSources" = @(
@{
"type" = "AzureCognitiveSearch"
"parameters" = @{
"endpoint" = $search_endpoint
"key" = $search_key
"indexName" = $search_index_name
"inScope" = "false"
}
}
)
}| ConvertTo-Json -Depth 10
We are always here to assist you. Please reach out if you require further assistance in the future. We would appreciate your consideration in accepting this post as the solution so this can be marked as resolved, which lets our management and community know you found a solution. Thank you for your understanding.