Not able to send files to QnA Maker using "bf qnamaker:kb:update" command

653 Views Asked by At

I'm trying to update QnA Maker knowledge base via script using:

bf qnamaker:kb:update --subscriptionKey=xxx --kbId=xxx --wait --in=UpdateKbOperationDTO.json

where UpdateKbOperationDTO.json is a file containing:

{
  "Add": {
    "Files": [
      {
        "FileName": "sample_file_1.txt",
        "FileUri": "file:///C:/myfolder/QnA/sample_file_1.txt"
      }
    ]
  },
  "DefaultAnswerUsedForExtraction": "",
  "Delete": "",
  "EnableHierarchicalExtraction": "",
  "Update": ""
}

I've tried a lot of alternatives but always receive an error on FileUri field.

{
    "code": "BadArgument",
    "message": "Invalid input. See details.",
    "details": [
        {
            "code": "ValidationFailure",
            "message": "File Uri has one or more invalid uri.",
            "target": "Add.Files[0].FileUri"
        }
    ]
}

What is the correct FileUri to use?

0

There are 0 best solutions below