...

Package qnamaker

import "github.com/Azure/azure-sdk-for-go/services/preview/qnamaker/cognitiveservices/v5.0-preview.1/qnamaker"
Overview
Index
Subdirectories

Overview ▾

Package qnamaker implements the Azure ARM Qnamaker service API version v5.0-preview.1.

An API for QnAMaker Service

Index ▾

func UserAgent() string
func Version() string
type ActiveLearningSettingsDTO
type AlterationsClient
    func NewAlterationsClient(endpoint string) AlterationsClient
    func (client AlterationsClient) Get(ctx context.Context) (result WordAlterationsDTO, err error)
    func (client AlterationsClient) GetAlterationsForKb(ctx context.Context, kbID string) (result WordAlterationsDTO, err error)
    func (client AlterationsClient) GetAlterationsForKbPreparer(ctx context.Context, kbID string) (*http.Request, error)
    func (client AlterationsClient) GetAlterationsForKbResponder(resp *http.Response) (result WordAlterationsDTO, err error)
    func (client AlterationsClient) GetAlterationsForKbSender(req *http.Request) (*http.Response, error)
    func (client AlterationsClient) GetPreparer(ctx context.Context) (*http.Request, error)
    func (client AlterationsClient) GetResponder(resp *http.Response) (result WordAlterationsDTO, err error)
    func (client AlterationsClient) GetSender(req *http.Request) (*http.Response, error)
    func (client AlterationsClient) Replace(ctx context.Context, wordAlterations WordAlterationsDTO) (result autorest.Response, err error)
    func (client AlterationsClient) ReplaceAlterationsForKb(ctx context.Context, kbID string, wordAlterations WordAlterationsDTO) (result autorest.Response, err error)
    func (client AlterationsClient) ReplaceAlterationsForKbPreparer(ctx context.Context, kbID string, wordAlterations WordAlterationsDTO) (*http.Request, error)
    func (client AlterationsClient) ReplaceAlterationsForKbResponder(resp *http.Response) (result autorest.Response, err error)
    func (client AlterationsClient) ReplaceAlterationsForKbSender(req *http.Request) (*http.Response, error)
    func (client AlterationsClient) ReplacePreparer(ctx context.Context, wordAlterations WordAlterationsDTO) (*http.Request, error)
    func (client AlterationsClient) ReplaceResponder(resp *http.Response) (result autorest.Response, err error)
    func (client AlterationsClient) ReplaceSender(req *http.Request) (*http.Response, error)
type AlterationsDTO
type AnswerSpanRequestDTO
type AnswerSpanResponseDTO
type BaseClient
    func New(endpoint string) BaseClient
    func NewWithoutDefaults(endpoint string) BaseClient
type ContextDTO
type CreateKbDTO
type CreateKbInputDTO
type DeleteKbContentsDTO
type EndpointKeysClient
    func NewEndpointKeysClient(endpoint string) EndpointKeysClient
    func (client EndpointKeysClient) GetKeys(ctx context.Context) (result EndpointKeysDTO, err error)
    func (client EndpointKeysClient) GetKeysPreparer(ctx context.Context) (*http.Request, error)
    func (client EndpointKeysClient) GetKeysResponder(resp *http.Response) (result EndpointKeysDTO, err error)
    func (client EndpointKeysClient) GetKeysSender(req *http.Request) (*http.Response, error)
    func (client EndpointKeysClient) RefreshKeys(ctx context.Context, keyType string) (result EndpointKeysDTO, err error)
    func (client EndpointKeysClient) RefreshKeysPreparer(ctx context.Context, keyType string) (*http.Request, error)
    func (client EndpointKeysClient) RefreshKeysResponder(resp *http.Response) (result EndpointKeysDTO, err error)
    func (client EndpointKeysClient) RefreshKeysSender(req *http.Request) (*http.Response, error)
type EndpointKeysDTO
type EndpointSettingsClient
    func NewEndpointSettingsClient(endpoint string) EndpointSettingsClient
    func (client EndpointSettingsClient) GetSettings(ctx context.Context) (result EndpointSettingsDTO, err error)
    func (client EndpointSettingsClient) GetSettingsPreparer(ctx context.Context) (*http.Request, error)
    func (client EndpointSettingsClient) GetSettingsResponder(resp *http.Response) (result EndpointSettingsDTO, err error)
    func (client EndpointSettingsClient) GetSettingsSender(req *http.Request) (*http.Response, error)
    func (client EndpointSettingsClient) UpdateSettings(ctx context.Context, endpointSettingsPayload EndpointSettingsDTO) (result autorest.Response, err error)
    func (client EndpointSettingsClient) UpdateSettingsPreparer(ctx context.Context, endpointSettingsPayload EndpointSettingsDTO) (*http.Request, error)
    func (client EndpointSettingsClient) UpdateSettingsResponder(resp *http.Response) (result autorest.Response, err error)
    func (client EndpointSettingsClient) UpdateSettingsSender(req *http.Request) (*http.Response, error)
type EndpointSettingsDTO
type EndpointSettingsDTOActiveLearning
type EnvironmentType
    func PossibleEnvironmentTypeValues() []EnvironmentType
type Error
type ErrorCodeType
    func PossibleErrorCodeTypeValues() []ErrorCodeType
type ErrorResponse
type ErrorResponseError
type FeedbackRecordDTO
type FeedbackRecordsDTO
type FileDTO
type InnerErrorModel
type KnowledgebaseClient
    func NewKnowledgebaseClient(endpoint string) KnowledgebaseClient
    func (client KnowledgebaseClient) Create(ctx context.Context, createKbPayload CreateKbDTO) (result Operation, err error)
    func (client KnowledgebaseClient) CreatePreparer(ctx context.Context, createKbPayload CreateKbDTO) (*http.Request, error)
    func (client KnowledgebaseClient) CreateResponder(resp *http.Response) (result Operation, err error)
    func (client KnowledgebaseClient) CreateSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) Delete(ctx context.Context, kbID string) (result autorest.Response, err error)
    func (client KnowledgebaseClient) DeletePreparer(ctx context.Context, kbID string) (*http.Request, error)
    func (client KnowledgebaseClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
    func (client KnowledgebaseClient) DeleteSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) Download(ctx context.Context, kbID string, environment EnvironmentType, source string, changedSince string) (result QnADocumentsDTO, err error)
    func (client KnowledgebaseClient) DownloadPreparer(ctx context.Context, kbID string, environment EnvironmentType, source string, changedSince string) (*http.Request, error)
    func (client KnowledgebaseClient) DownloadResponder(resp *http.Response) (result QnADocumentsDTO, err error)
    func (client KnowledgebaseClient) DownloadSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) GenerateAnswer(ctx context.Context, kbID string, generateAnswerPayload QueryDTO) (result QnASearchResultList, err error)
    func (client KnowledgebaseClient) GenerateAnswerPreparer(ctx context.Context, kbID string, generateAnswerPayload QueryDTO) (*http.Request, error)
    func (client KnowledgebaseClient) GenerateAnswerResponder(resp *http.Response) (result QnASearchResultList, err error)
    func (client KnowledgebaseClient) GenerateAnswerSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) GetDetails(ctx context.Context, kbID string) (result KnowledgebaseDTO, err error)
    func (client KnowledgebaseClient) GetDetailsPreparer(ctx context.Context, kbID string) (*http.Request, error)
    func (client KnowledgebaseClient) GetDetailsResponder(resp *http.Response) (result KnowledgebaseDTO, err error)
    func (client KnowledgebaseClient) GetDetailsSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) ListAll(ctx context.Context) (result KnowledgebasesDTO, err error)
    func (client KnowledgebaseClient) ListAllPreparer(ctx context.Context) (*http.Request, error)
    func (client KnowledgebaseClient) ListAllResponder(resp *http.Response) (result KnowledgebasesDTO, err error)
    func (client KnowledgebaseClient) ListAllSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) Publish(ctx context.Context, kbID string) (result autorest.Response, err error)
    func (client KnowledgebaseClient) PublishPreparer(ctx context.Context, kbID string) (*http.Request, error)
    func (client KnowledgebaseClient) PublishResponder(resp *http.Response) (result autorest.Response, err error)
    func (client KnowledgebaseClient) PublishSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) Replace(ctx context.Context, kbID string, replaceKb ReplaceKbDTO) (result autorest.Response, err error)
    func (client KnowledgebaseClient) ReplacePreparer(ctx context.Context, kbID string, replaceKb ReplaceKbDTO) (*http.Request, error)
    func (client KnowledgebaseClient) ReplaceResponder(resp *http.Response) (result autorest.Response, err error)
    func (client KnowledgebaseClient) ReplaceSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) Train(ctx context.Context, kbID string, trainPayload FeedbackRecordsDTO) (result autorest.Response, err error)
    func (client KnowledgebaseClient) TrainPreparer(ctx context.Context, kbID string, trainPayload FeedbackRecordsDTO) (*http.Request, error)
    func (client KnowledgebaseClient) TrainResponder(resp *http.Response) (result autorest.Response, err error)
    func (client KnowledgebaseClient) TrainSender(req *http.Request) (*http.Response, error)
    func (client KnowledgebaseClient) Update(ctx context.Context, kbID string, updateKb UpdateKbOperationDTO) (result Operation, err error)
    func (client KnowledgebaseClient) UpdatePreparer(ctx context.Context, kbID string, updateKb UpdateKbOperationDTO) (*http.Request, error)
    func (client KnowledgebaseClient) UpdateResponder(resp *http.Response) (result Operation, err error)
    func (client KnowledgebaseClient) UpdateSender(req *http.Request) (*http.Response, error)
type KnowledgebaseDTO
type KnowledgebasesDTO
type MetadataDTO
type Operation
type OperationStateType
    func PossibleOperationStateTypeValues() []OperationStateType
type OperationsClient
    func NewOperationsClient(endpoint string) OperationsClient
    func (client OperationsClient) GetDetails(ctx context.Context, operationID string) (result Operation, err error)
    func (client OperationsClient) GetDetailsPreparer(ctx context.Context, operationID string) (*http.Request, error)
    func (client OperationsClient) GetDetailsResponder(resp *http.Response) (result Operation, err error)
    func (client OperationsClient) GetDetailsSender(req *http.Request) (*http.Response, error)
type PromptDTO
type PromptDTOQna
type QnADTO
type QnADTOContext
type QnADocumentsDTO
type QnASearchResult
type QnASearchResultAnswerSpan
type QnASearchResultContext
type QnASearchResultList
type QueryContextDTO
type QueryDTO
type QueryDTOAnswerSpanRequest
type QueryDTOContext
type ReplaceKbDTO
type StrictFiltersCompoundOperationType
    func PossibleStrictFiltersCompoundOperationTypeValues() []StrictFiltersCompoundOperationType
type UpdateContextDTO
type UpdateKbContentsDTO
type UpdateKbOperationDTO
type UpdateKbOperationDTOAdd
type UpdateKbOperationDTODelete
type UpdateKbOperationDTOUpdate
type UpdateMetadataDTO
type UpdateQnaDTO
type UpdateQnaDTOContext
type UpdateQnaDTOMetadata
type UpdateQnaDTOQuestions
type UpdateQuestionsDTO
type WordAlterationsDTO

Package files

alterations.go client.go endpointkeys.go endpointsettings.go enums.go knowledgebase.go models.go operations.go version.go

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

type ActiveLearningSettingsDTO

ActiveLearningSettingsDTO active Learning settings of the endpoint.

type ActiveLearningSettingsDTO struct {
    // Enable - True/False string providing Active Learning
    Enable *string `json:"enable,omitempty"`
}

type AlterationsClient

AlterationsClient is the an API for QnAMaker Service

type AlterationsClient struct {
    BaseClient
}

func NewAlterationsClient

func NewAlterationsClient(endpoint string) AlterationsClient

NewAlterationsClient creates an instance of the AlterationsClient client.

func (AlterationsClient) Get

func (client AlterationsClient) Get(ctx context.Context) (result WordAlterationsDTO, err error)

Get sends the get request.

func (AlterationsClient) GetAlterationsForKb

func (client AlterationsClient) GetAlterationsForKb(ctx context.Context, kbID string) (result WordAlterationsDTO, err error)

GetAlterationsForKb sends the get alterations for kb request. Parameters: kbID - knowledgebase id.

func (AlterationsClient) GetAlterationsForKbPreparer

func (client AlterationsClient) GetAlterationsForKbPreparer(ctx context.Context, kbID string) (*http.Request, error)

GetAlterationsForKbPreparer prepares the GetAlterationsForKb request.

func (AlterationsClient) GetAlterationsForKbResponder

func (client AlterationsClient) GetAlterationsForKbResponder(resp *http.Response) (result WordAlterationsDTO, err error)

GetAlterationsForKbResponder handles the response to the GetAlterationsForKb request. The method always closes the http.Response Body.

func (AlterationsClient) GetAlterationsForKbSender

func (client AlterationsClient) GetAlterationsForKbSender(req *http.Request) (*http.Response, error)

GetAlterationsForKbSender sends the GetAlterationsForKb request. The method will close the http.Response Body if it receives an error.

func (AlterationsClient) GetPreparer

func (client AlterationsClient) GetPreparer(ctx context.Context) (*http.Request, error)

GetPreparer prepares the Get request.

func (AlterationsClient) GetResponder

func (client AlterationsClient) GetResponder(resp *http.Response) (result WordAlterationsDTO, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (AlterationsClient) GetSender

func (client AlterationsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (AlterationsClient) Replace

func (client AlterationsClient) Replace(ctx context.Context, wordAlterations WordAlterationsDTO) (result autorest.Response, err error)

Replace sends the replace request. Parameters: wordAlterations - new alterations data.

func (AlterationsClient) ReplaceAlterationsForKb

func (client AlterationsClient) ReplaceAlterationsForKb(ctx context.Context, kbID string, wordAlterations WordAlterationsDTO) (result autorest.Response, err error)

ReplaceAlterationsForKb sends the replace alterations for kb request. Parameters: kbID - knowledgebase id. wordAlterations - new alterations data.

func (AlterationsClient) ReplaceAlterationsForKbPreparer

func (client AlterationsClient) ReplaceAlterationsForKbPreparer(ctx context.Context, kbID string, wordAlterations WordAlterationsDTO) (*http.Request, error)

ReplaceAlterationsForKbPreparer prepares the ReplaceAlterationsForKb request.

func (AlterationsClient) ReplaceAlterationsForKbResponder

func (client AlterationsClient) ReplaceAlterationsForKbResponder(resp *http.Response) (result autorest.Response, err error)

ReplaceAlterationsForKbResponder handles the response to the ReplaceAlterationsForKb request. The method always closes the http.Response Body.

func (AlterationsClient) ReplaceAlterationsForKbSender

func (client AlterationsClient) ReplaceAlterationsForKbSender(req *http.Request) (*http.Response, error)

ReplaceAlterationsForKbSender sends the ReplaceAlterationsForKb request. The method will close the http.Response Body if it receives an error.

func (AlterationsClient) ReplacePreparer

func (client AlterationsClient) ReplacePreparer(ctx context.Context, wordAlterations WordAlterationsDTO) (*http.Request, error)

ReplacePreparer prepares the Replace request.

func (AlterationsClient) ReplaceResponder

func (client AlterationsClient) ReplaceResponder(resp *http.Response) (result autorest.Response, err error)

ReplaceResponder handles the response to the Replace request. The method always closes the http.Response Body.

func (AlterationsClient) ReplaceSender

func (client AlterationsClient) ReplaceSender(req *http.Request) (*http.Response, error)

ReplaceSender sends the Replace request. The method will close the http.Response Body if it receives an error.

type AlterationsDTO

AlterationsDTO collection of words that are synonyms.

type AlterationsDTO struct {
    // Alterations - Words that are synonymous with each other.
    Alterations *[]string `json:"alterations,omitempty"`
}

type AnswerSpanRequestDTO

AnswerSpanRequestDTO to configure Answer span prediction feature.

type AnswerSpanRequestDTO struct {
    // Enable - Enable or Disable Answer Span prediction.
    Enable *bool `json:"enable,omitempty"`
    // ScoreThreshold - Minimum threshold score required to include an answer span.
    ScoreThreshold *float64 `json:"scoreThreshold,omitempty"`
    // TopAnswersWithSpan - Number of Top answers to be considered for span prediction.
    TopAnswersWithSpan *int32 `json:"topAnswersWithSpan,omitempty"`
}

type AnswerSpanResponseDTO

AnswerSpanResponseDTO answer span object of QnA.

type AnswerSpanResponseDTO struct {
    // Text - Predicted text of answer span.
    Text *string `json:"text,omitempty"`
    // Score - Predicted score of answer span.
    Score *float64 `json:"score,omitempty"`
    // StartIndex - Start index of answer span in answer.
    StartIndex *int32 `json:"startIndex,omitempty"`
    // EndIndex - End index of answer span in answer.
    EndIndex *int32 `json:"endIndex,omitempty"`
}

type BaseClient

BaseClient is the base client for Qnamaker.

type BaseClient struct {
    autorest.Client
    Endpoint string
}

func New

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type ContextDTO

ContextDTO context associated with Qna.

type ContextDTO struct {
    // IsContextOnly - To mark if a prompt is relevant only with a previous question or not.
    // true - Do not include this QnA as search result for queries without context
    // false - ignores context and includes this QnA in search result
    IsContextOnly *bool `json:"isContextOnly,omitempty"`
    // Prompts - List of prompts associated with the answer.
    Prompts *[]PromptDTO `json:"prompts,omitempty"`
}

type CreateKbDTO

CreateKbDTO post body schema for CreateKb operation.

type CreateKbDTO struct {
    // Name - Friendly name for the knowledgebase.
    Name *string `json:"name,omitempty"`
    // QnaList - List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.
    QnaList *[]QnADTO `json:"qnaList,omitempty"`
    // Urls - List of URLs to be used for extracting Q-A.
    Urls *[]string `json:"urls,omitempty"`
    // Files - List of files from which to Extract Q-A.
    Files *[]FileDTO `json:"files,omitempty"`
    // EnableHierarchicalExtraction - Enable hierarchical extraction of Q-A from files and urls. Value to be considered False if this field is not present.
    EnableHierarchicalExtraction *bool `json:"enableHierarchicalExtraction,omitempty"`
    // DefaultAnswerUsedForExtraction - Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True.
    DefaultAnswerUsedForExtraction *string `json:"defaultAnswerUsedForExtraction,omitempty"`
    // Language - Language of the knowledgebase. Please find the list of supported languages <a href="https://aka.ms/qnamaker-languages#languages-supported" target="_blank">here</a>.
    Language *string `json:"language,omitempty"`
    // EnableMultipleLanguages - Set to true to enable creating KBs in different languages for the same resource.
    EnableMultipleLanguages *bool `json:"enableMultipleLanguages,omitempty"`
    // DefaultAnswer - Default answer sent to user if no good match is found in the KB.
    DefaultAnswer *string `json:"defaultAnswer,omitempty"`
}

type CreateKbInputDTO

CreateKbInputDTO input to create KB.

type CreateKbInputDTO struct {
    // QnaList - List of QNA to be added to the index. Ids are generated by the service and should be omitted.
    QnaList *[]QnADTO `json:"qnaList,omitempty"`
    // Urls - List of URLs to be added to knowledgebase.
    Urls *[]string `json:"urls,omitempty"`
    // Files - List of files to be added to knowledgebase.
    Files *[]FileDTO `json:"files,omitempty"`
}

type DeleteKbContentsDTO

DeleteKbContentsDTO PATCH body schema of Delete Operation in UpdateKb

type DeleteKbContentsDTO struct {
    // Ids - List of Qna Ids to be deleted
    Ids *[]int32 `json:"ids,omitempty"`
    // Sources - List of sources to be deleted from knowledgebase.
    Sources *[]string `json:"sources,omitempty"`
}

type EndpointKeysClient

EndpointKeysClient is the an API for QnAMaker Service

type EndpointKeysClient struct {
    BaseClient
}

func NewEndpointKeysClient

func NewEndpointKeysClient(endpoint string) EndpointKeysClient

NewEndpointKeysClient creates an instance of the EndpointKeysClient client.

func (EndpointKeysClient) GetKeys

func (client EndpointKeysClient) GetKeys(ctx context.Context) (result EndpointKeysDTO, err error)

GetKeys sends the get keys request.

func (EndpointKeysClient) GetKeysPreparer

func (client EndpointKeysClient) GetKeysPreparer(ctx context.Context) (*http.Request, error)

GetKeysPreparer prepares the GetKeys request.

func (EndpointKeysClient) GetKeysResponder

func (client EndpointKeysClient) GetKeysResponder(resp *http.Response) (result EndpointKeysDTO, err error)

GetKeysResponder handles the response to the GetKeys request. The method always closes the http.Response Body.

func (EndpointKeysClient) GetKeysSender

func (client EndpointKeysClient) GetKeysSender(req *http.Request) (*http.Response, error)

GetKeysSender sends the GetKeys request. The method will close the http.Response Body if it receives an error.

func (EndpointKeysClient) RefreshKeys

func (client EndpointKeysClient) RefreshKeys(ctx context.Context, keyType string) (result EndpointKeysDTO, err error)

RefreshKeys sends the refresh keys request. Parameters: keyType - type of Key

func (EndpointKeysClient) RefreshKeysPreparer

func (client EndpointKeysClient) RefreshKeysPreparer(ctx context.Context, keyType string) (*http.Request, error)

RefreshKeysPreparer prepares the RefreshKeys request.

func (EndpointKeysClient) RefreshKeysResponder

func (client EndpointKeysClient) RefreshKeysResponder(resp *http.Response) (result EndpointKeysDTO, err error)

RefreshKeysResponder handles the response to the RefreshKeys request. The method always closes the http.Response Body.

func (EndpointKeysClient) RefreshKeysSender

func (client EndpointKeysClient) RefreshKeysSender(req *http.Request) (*http.Response, error)

RefreshKeysSender sends the RefreshKeys request. The method will close the http.Response Body if it receives an error.

type EndpointKeysDTO

EndpointKeysDTO schema for EndpointKeys generate/refresh operations.

type EndpointKeysDTO struct {
    autorest.Response `json:"-"`
    // PrimaryEndpointKey - Primary Access Key.
    PrimaryEndpointKey *string `json:"primaryEndpointKey,omitempty"`
    // SecondaryEndpointKey - Secondary Access Key.
    SecondaryEndpointKey *string `json:"secondaryEndpointKey,omitempty"`
    // InstalledVersion - Current version of runtime.
    InstalledVersion *string `json:"installedVersion,omitempty"`
    // LastStableVersion - Latest version of runtime.
    LastStableVersion *string `json:"lastStableVersion,omitempty"`
    // Language - Language setting of runtime.
    Language *string `json:"language,omitempty"`
}

type EndpointSettingsClient

EndpointSettingsClient is the an API for QnAMaker Service

type EndpointSettingsClient struct {
    BaseClient
}

func NewEndpointSettingsClient

func NewEndpointSettingsClient(endpoint string) EndpointSettingsClient

NewEndpointSettingsClient creates an instance of the EndpointSettingsClient client.

func (EndpointSettingsClient) GetSettings

func (client EndpointSettingsClient) GetSettings(ctx context.Context) (result EndpointSettingsDTO, err error)

GetSettings sends the get settings request.

func (EndpointSettingsClient) GetSettingsPreparer

func (client EndpointSettingsClient) GetSettingsPreparer(ctx context.Context) (*http.Request, error)

GetSettingsPreparer prepares the GetSettings request.

func (EndpointSettingsClient) GetSettingsResponder

func (client EndpointSettingsClient) GetSettingsResponder(resp *http.Response) (result EndpointSettingsDTO, err error)

GetSettingsResponder handles the response to the GetSettings request. The method always closes the http.Response Body.

func (EndpointSettingsClient) GetSettingsSender

func (client EndpointSettingsClient) GetSettingsSender(req *http.Request) (*http.Response, error)

GetSettingsSender sends the GetSettings request. The method will close the http.Response Body if it receives an error.

func (EndpointSettingsClient) UpdateSettings

func (client EndpointSettingsClient) UpdateSettings(ctx context.Context, endpointSettingsPayload EndpointSettingsDTO) (result autorest.Response, err error)

UpdateSettings sends the update settings request. Parameters: endpointSettingsPayload - post body of the request.

func (EndpointSettingsClient) UpdateSettingsPreparer

func (client EndpointSettingsClient) UpdateSettingsPreparer(ctx context.Context, endpointSettingsPayload EndpointSettingsDTO) (*http.Request, error)

UpdateSettingsPreparer prepares the UpdateSettings request.

func (EndpointSettingsClient) UpdateSettingsResponder

func (client EndpointSettingsClient) UpdateSettingsResponder(resp *http.Response) (result autorest.Response, err error)

UpdateSettingsResponder handles the response to the UpdateSettings request. The method always closes the http.Response Body.

func (EndpointSettingsClient) UpdateSettingsSender

func (client EndpointSettingsClient) UpdateSettingsSender(req *http.Request) (*http.Response, error)

UpdateSettingsSender sends the UpdateSettings request. The method will close the http.Response Body if it receives an error.

type EndpointSettingsDTO

EndpointSettingsDTO endpoint settings.

type EndpointSettingsDTO struct {
    autorest.Response `json:"-"`
    // ActiveLearning - Active Learning settings of the endpoint.
    ActiveLearning *EndpointSettingsDTOActiveLearning `json:"activeLearning,omitempty"`
}

type EndpointSettingsDTOActiveLearning

EndpointSettingsDTOActiveLearning active Learning settings of the endpoint.

type EndpointSettingsDTOActiveLearning struct {
    // Enable - True/False string providing Active Learning
    Enable *string `json:"enable,omitempty"`
}

type EnvironmentType

EnvironmentType enumerates the values for environment type.

type EnvironmentType string
const (
    // Prod ...
    Prod EnvironmentType = "Prod"
    // Test ...
    Test EnvironmentType = "Test"
)

func PossibleEnvironmentTypeValues

func PossibleEnvironmentTypeValues() []EnvironmentType

PossibleEnvironmentTypeValues returns an array of possible values for the EnvironmentType const type.

type Error

Error the error object. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

type Error struct {
    // Code - One of a server-defined set of error codes. Possible values include: 'BadArgument', 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', 'OperationNotFound', 'ServiceError', 'ValidationFailure', 'ExtractionFailure'
    Code ErrorCodeType `json:"code,omitempty"`
    // Message - A human-readable representation of the error.
    Message *string `json:"message,omitempty"`
    // Target - The target of the error.
    Target *string `json:"target,omitempty"`
    // Details - An array of details about specific errors that led to this reported error.
    Details *[]Error `json:"details,omitempty"`
    // InnerError - An object containing more specific information than the current object about the error.
    InnerError *InnerErrorModel `json:"innerError,omitempty"`
}

type ErrorCodeType

ErrorCodeType enumerates the values for error code type.

type ErrorCodeType string
const (
    // BadArgument ...
    BadArgument ErrorCodeType = "BadArgument"
    // EndpointKeysError ...
    EndpointKeysError ErrorCodeType = "EndpointKeysError"
    // ExtractionFailure ...
    ExtractionFailure ErrorCodeType = "ExtractionFailure"
    // Forbidden ...
    Forbidden ErrorCodeType = "Forbidden"
    // KbNotFound ...
    KbNotFound ErrorCodeType = "KbNotFound"
    // NotFound ...
    NotFound ErrorCodeType = "NotFound"
    // OperationNotFound ...
    OperationNotFound ErrorCodeType = "OperationNotFound"
    // QnaRuntimeError ...
    QnaRuntimeError ErrorCodeType = "QnaRuntimeError"
    // QuotaExceeded ...
    QuotaExceeded ErrorCodeType = "QuotaExceeded"
    // ServiceError ...
    ServiceError ErrorCodeType = "ServiceError"
    // SKULimitExceeded ...
    SKULimitExceeded ErrorCodeType = "SKULimitExceeded"
    // Unauthorized ...
    Unauthorized ErrorCodeType = "Unauthorized"
    // Unspecified ...
    Unspecified ErrorCodeType = "Unspecified"
    // ValidationFailure ...
    ValidationFailure ErrorCodeType = "ValidationFailure"
)

func PossibleErrorCodeTypeValues

func PossibleErrorCodeTypeValues() []ErrorCodeType

PossibleErrorCodeTypeValues returns an array of possible values for the ErrorCodeType const type.

type ErrorResponse

ErrorResponse error response. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

type ErrorResponse struct {
    // Error - The error object.
    Error *ErrorResponseError `json:"error,omitempty"`
}

type ErrorResponseError

ErrorResponseError the error object.

type ErrorResponseError struct {
    // Code - One of a server-defined set of error codes. Possible values include: 'BadArgument', 'Forbidden', 'NotFound', 'KbNotFound', 'Unauthorized', 'Unspecified', 'EndpointKeysError', 'QuotaExceeded', 'QnaRuntimeError', 'SKULimitExceeded', 'OperationNotFound', 'ServiceError', 'ValidationFailure', 'ExtractionFailure'
    Code ErrorCodeType `json:"code,omitempty"`
    // Message - A human-readable representation of the error.
    Message *string `json:"message,omitempty"`
    // Target - The target of the error.
    Target *string `json:"target,omitempty"`
    // Details - An array of details about specific errors that led to this reported error.
    Details *[]Error `json:"details,omitempty"`
    // InnerError - An object containing more specific information than the current object about the error.
    InnerError *InnerErrorModel `json:"innerError,omitempty"`
}

type FeedbackRecordDTO

FeedbackRecordDTO active learning feedback record.

type FeedbackRecordDTO struct {
    // UserID - Unique identifier for the user.
    UserID *string `json:"userId,omitempty"`
    // UserQuestion - The suggested question being provided as feedback.
    UserQuestion *string `json:"userQuestion,omitempty"`
    // QnaID - The qnaId for which the suggested question is provided as feedback.
    QnaID *int32 `json:"qnaId,omitempty"`
}

type FeedbackRecordsDTO

FeedbackRecordsDTO active learning feedback records.

type FeedbackRecordsDTO struct {
    // FeedbackRecords - List of feedback records.
    FeedbackRecords *[]FeedbackRecordDTO `json:"feedbackRecords,omitempty"`
}

type FileDTO

FileDTO DTO to hold details of uploaded files.

type FileDTO struct {
    // FileName - File name. Supported file types are ".tsv", ".pdf", ".txt", ".docx", ".xlsx".
    FileName *string `json:"fileName,omitempty"`
    // FileURI - Public URI of the file.
    FileURI *string `json:"fileUri,omitempty"`
}

type InnerErrorModel

InnerErrorModel an object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

type InnerErrorModel struct {
    // Code - A more specific error code than was provided by the containing error.
    Code *string `json:"code,omitempty"`
    // InnerError - An object containing more specific information than the current object about the error.
    InnerError *InnerErrorModel `json:"innerError,omitempty"`
}

type KnowledgebaseClient

KnowledgebaseClient is the an API for QnAMaker Service

type KnowledgebaseClient struct {
    BaseClient
}

func NewKnowledgebaseClient

func NewKnowledgebaseClient(endpoint string) KnowledgebaseClient

NewKnowledgebaseClient creates an instance of the KnowledgebaseClient client.

func (KnowledgebaseClient) Create

func (client KnowledgebaseClient) Create(ctx context.Context, createKbPayload CreateKbDTO) (result Operation, err error)

Create sends the create request. Parameters: createKbPayload - post body of the request.

func (KnowledgebaseClient) CreatePreparer

func (client KnowledgebaseClient) CreatePreparer(ctx context.Context, createKbPayload CreateKbDTO) (*http.Request, error)

CreatePreparer prepares the Create request.

func (KnowledgebaseClient) CreateResponder

func (client KnowledgebaseClient) CreateResponder(resp *http.Response) (result Operation, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (KnowledgebaseClient) CreateSender

func (client KnowledgebaseClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) Delete

func (client KnowledgebaseClient) Delete(ctx context.Context, kbID string) (result autorest.Response, err error)

Delete sends the delete request. Parameters: kbID - knowledgebase id.

func (KnowledgebaseClient) DeletePreparer

func (client KnowledgebaseClient) DeletePreparer(ctx context.Context, kbID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (KnowledgebaseClient) DeleteResponder

func (client KnowledgebaseClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (KnowledgebaseClient) DeleteSender

func (client KnowledgebaseClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) Download

func (client KnowledgebaseClient) Download(ctx context.Context, kbID string, environment EnvironmentType, source string, changedSince string) (result QnADocumentsDTO, err error)

Download sends the download request. Parameters: kbID - knowledgebase id. environment - specifies whether environment is Test or Prod. source - the source property filter to apply. changedSince - the last changed status property filter to apply.

func (KnowledgebaseClient) DownloadPreparer

func (client KnowledgebaseClient) DownloadPreparer(ctx context.Context, kbID string, environment EnvironmentType, source string, changedSince string) (*http.Request, error)

DownloadPreparer prepares the Download request.

func (KnowledgebaseClient) DownloadResponder

func (client KnowledgebaseClient) DownloadResponder(resp *http.Response) (result QnADocumentsDTO, err error)

DownloadResponder handles the response to the Download request. The method always closes the http.Response Body.

func (KnowledgebaseClient) DownloadSender

func (client KnowledgebaseClient) DownloadSender(req *http.Request) (*http.Response, error)

DownloadSender sends the Download request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) GenerateAnswer

func (client KnowledgebaseClient) GenerateAnswer(ctx context.Context, kbID string, generateAnswerPayload QueryDTO) (result QnASearchResultList, err error)

GenerateAnswer sends the generate answer request. Parameters: kbID - knowledgebase id. generateAnswerPayload - post body of the request.

func (KnowledgebaseClient) GenerateAnswerPreparer

func (client KnowledgebaseClient) GenerateAnswerPreparer(ctx context.Context, kbID string, generateAnswerPayload QueryDTO) (*http.Request, error)

GenerateAnswerPreparer prepares the GenerateAnswer request.

func (KnowledgebaseClient) GenerateAnswerResponder

func (client KnowledgebaseClient) GenerateAnswerResponder(resp *http.Response) (result QnASearchResultList, err error)

GenerateAnswerResponder handles the response to the GenerateAnswer request. The method always closes the http.Response Body.

func (KnowledgebaseClient) GenerateAnswerSender

func (client KnowledgebaseClient) GenerateAnswerSender(req *http.Request) (*http.Response, error)

GenerateAnswerSender sends the GenerateAnswer request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) GetDetails

func (client KnowledgebaseClient) GetDetails(ctx context.Context, kbID string) (result KnowledgebaseDTO, err error)

GetDetails sends the get details request. Parameters: kbID - knowledgebase id.

func (KnowledgebaseClient) GetDetailsPreparer

func (client KnowledgebaseClient) GetDetailsPreparer(ctx context.Context, kbID string) (*http.Request, error)

GetDetailsPreparer prepares the GetDetails request.

func (KnowledgebaseClient) GetDetailsResponder

func (client KnowledgebaseClient) GetDetailsResponder(resp *http.Response) (result KnowledgebaseDTO, err error)

GetDetailsResponder handles the response to the GetDetails request. The method always closes the http.Response Body.

func (KnowledgebaseClient) GetDetailsSender

func (client KnowledgebaseClient) GetDetailsSender(req *http.Request) (*http.Response, error)

GetDetailsSender sends the GetDetails request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) ListAll

func (client KnowledgebaseClient) ListAll(ctx context.Context) (result KnowledgebasesDTO, err error)

ListAll sends the list all request.

func (KnowledgebaseClient) ListAllPreparer

func (client KnowledgebaseClient) ListAllPreparer(ctx context.Context) (*http.Request, error)

ListAllPreparer prepares the ListAll request.

func (KnowledgebaseClient) ListAllResponder

func (client KnowledgebaseClient) ListAllResponder(resp *http.Response) (result KnowledgebasesDTO, err error)

ListAllResponder handles the response to the ListAll request. The method always closes the http.Response Body.

func (KnowledgebaseClient) ListAllSender

func (client KnowledgebaseClient) ListAllSender(req *http.Request) (*http.Response, error)

ListAllSender sends the ListAll request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) Publish

func (client KnowledgebaseClient) Publish(ctx context.Context, kbID string) (result autorest.Response, err error)

Publish sends the publish request. Parameters: kbID - knowledgebase id.

func (KnowledgebaseClient) PublishPreparer

func (client KnowledgebaseClient) PublishPreparer(ctx context.Context, kbID string) (*http.Request, error)

PublishPreparer prepares the Publish request.

func (KnowledgebaseClient) PublishResponder

func (client KnowledgebaseClient) PublishResponder(resp *http.Response) (result autorest.Response, err error)

PublishResponder handles the response to the Publish request. The method always closes the http.Response Body.

func (KnowledgebaseClient) PublishSender

func (client KnowledgebaseClient) PublishSender(req *http.Request) (*http.Response, error)

PublishSender sends the Publish request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) Replace

func (client KnowledgebaseClient) Replace(ctx context.Context, kbID string, replaceKb ReplaceKbDTO) (result autorest.Response, err error)

Replace sends the replace request. Parameters: kbID - knowledgebase id. replaceKb - an instance of ReplaceKbDTO which contains list of qnas to be uploaded

func (KnowledgebaseClient) ReplacePreparer

func (client KnowledgebaseClient) ReplacePreparer(ctx context.Context, kbID string, replaceKb ReplaceKbDTO) (*http.Request, error)

ReplacePreparer prepares the Replace request.

func (KnowledgebaseClient) ReplaceResponder

func (client KnowledgebaseClient) ReplaceResponder(resp *http.Response) (result autorest.Response, err error)

ReplaceResponder handles the response to the Replace request. The method always closes the http.Response Body.

func (KnowledgebaseClient) ReplaceSender

func (client KnowledgebaseClient) ReplaceSender(req *http.Request) (*http.Response, error)

ReplaceSender sends the Replace request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) Train

func (client KnowledgebaseClient) Train(ctx context.Context, kbID string, trainPayload FeedbackRecordsDTO) (result autorest.Response, err error)

Train sends the train request. Parameters: kbID - knowledgebase id. trainPayload - post body of the request.

func (KnowledgebaseClient) TrainPreparer

func (client KnowledgebaseClient) TrainPreparer(ctx context.Context, kbID string, trainPayload FeedbackRecordsDTO) (*http.Request, error)

TrainPreparer prepares the Train request.

func (KnowledgebaseClient) TrainResponder

func (client KnowledgebaseClient) TrainResponder(resp *http.Response) (result autorest.Response, err error)

TrainResponder handles the response to the Train request. The method always closes the http.Response Body.

func (KnowledgebaseClient) TrainSender

func (client KnowledgebaseClient) TrainSender(req *http.Request) (*http.Response, error)

TrainSender sends the Train request. The method will close the http.Response Body if it receives an error.

func (KnowledgebaseClient) Update

func (client KnowledgebaseClient) Update(ctx context.Context, kbID string, updateKb UpdateKbOperationDTO) (result Operation, err error)

Update sends the update request. Parameters: kbID - knowledgebase id. updateKb - post body of the request.

func (KnowledgebaseClient) UpdatePreparer

func (client KnowledgebaseClient) UpdatePreparer(ctx context.Context, kbID string, updateKb UpdateKbOperationDTO) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (KnowledgebaseClient) UpdateResponder

func (client KnowledgebaseClient) UpdateResponder(resp *http.Response) (result Operation, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (KnowledgebaseClient) UpdateSender

func (client KnowledgebaseClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type KnowledgebaseDTO

KnowledgebaseDTO response schema for CreateKb operation.

type KnowledgebaseDTO struct {
    autorest.Response `json:"-"`
    // ID - Unique id that identifies a knowledgebase.
    ID *string `json:"id,omitempty"`
    // HostName - URL host name at which the knowledgebase is hosted.
    HostName *string `json:"hostName,omitempty"`
    // LastAccessedTimestamp - Time stamp at which the knowledgebase was last accessed (UTC).
    LastAccessedTimestamp *string `json:"lastAccessedTimestamp,omitempty"`
    // LastChangedTimestamp - Time stamp at which the knowledgebase was last modified (UTC).
    LastChangedTimestamp *string `json:"lastChangedTimestamp,omitempty"`
    // LastPublishedTimestamp - Time stamp at which the knowledgebase was last published (UTC).
    LastPublishedTimestamp *string `json:"lastPublishedTimestamp,omitempty"`
    // Name - Friendly name of the knowledgebase.
    Name *string `json:"name,omitempty"`
    // UserID - User who created / owns the knowledgebase.
    UserID *string `json:"userId,omitempty"`
    // Urls - URL sources from which Q-A were extracted and added to the knowledgebase.
    Urls *[]string `json:"urls,omitempty"`
    // Sources - Custom sources from which Q-A were extracted or explicitly added to the knowledgebase.
    Sources *[]string `json:"sources,omitempty"`
}

type KnowledgebasesDTO

KnowledgebasesDTO collection of knowledgebases owned by a user.

type KnowledgebasesDTO struct {
    autorest.Response `json:"-"`
    // Knowledgebases - Collection of knowledgebase records.
    Knowledgebases *[]KnowledgebaseDTO `json:"knowledgebases,omitempty"`
}

type MetadataDTO

MetadataDTO name - value pair of metadata.

type MetadataDTO struct {
    // Name - Metadata name.
    Name *string `json:"name,omitempty"`
    // Value - Metadata value.
    Value *string `json:"value,omitempty"`
}

type Operation

Operation record to track long running operation.

type Operation struct {
    autorest.Response `json:"-"`
    // OperationState - Operation state. Possible values include: 'Failed', 'NotStarted', 'Running', 'Succeeded'
    OperationState OperationStateType `json:"operationState,omitempty"`
    // CreatedTimestamp - Timestamp when the operation was created.
    CreatedTimestamp *string `json:"createdTimestamp,omitempty"`
    // LastActionTimestamp - Timestamp when the current state was entered.
    LastActionTimestamp *string `json:"lastActionTimestamp,omitempty"`
    // ResourceLocation - Relative URI to the target resource location for completed resources.
    ResourceLocation *string `json:"resourceLocation,omitempty"`
    // UserID - User Id
    UserID *string `json:"userId,omitempty"`
    // OperationID - Operation Id.
    OperationID *string `json:"operationId,omitempty"`
    // ErrorResponse - Error details in case of failures.
    ErrorResponse *ErrorResponse `json:"errorResponse,omitempty"`
}

type OperationStateType

OperationStateType enumerates the values for operation state type.

type OperationStateType string
const (
    // Failed ...
    Failed OperationStateType = "Failed"
    // NotStarted ...
    NotStarted OperationStateType = "NotStarted"
    // Running ...
    Running OperationStateType = "Running"
    // Succeeded ...
    Succeeded OperationStateType = "Succeeded"
)

func PossibleOperationStateTypeValues

func PossibleOperationStateTypeValues() []OperationStateType

PossibleOperationStateTypeValues returns an array of possible values for the OperationStateType const type.

type OperationsClient

OperationsClient is the an API for QnAMaker Service

type OperationsClient struct {
    BaseClient
}

func NewOperationsClient

func NewOperationsClient(endpoint string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func (OperationsClient) GetDetails

func (client OperationsClient) GetDetails(ctx context.Context, operationID string) (result Operation, err error)

GetDetails sends the get details request. Parameters: operationID - operation id.

func (OperationsClient) GetDetailsPreparer

func (client OperationsClient) GetDetailsPreparer(ctx context.Context, operationID string) (*http.Request, error)

GetDetailsPreparer prepares the GetDetails request.

func (OperationsClient) GetDetailsResponder

func (client OperationsClient) GetDetailsResponder(resp *http.Response) (result Operation, err error)

GetDetailsResponder handles the response to the GetDetails request. The method always closes the http.Response Body.

func (OperationsClient) GetDetailsSender

func (client OperationsClient) GetDetailsSender(req *http.Request) (*http.Response, error)

GetDetailsSender sends the GetDetails request. The method will close the http.Response Body if it receives an error.

type PromptDTO

PromptDTO prompt for an answer.

type PromptDTO struct {
    // DisplayOrder - Index of the prompt - used in ordering of the prompts
    DisplayOrder *int32 `json:"displayOrder,omitempty"`
    // QnaID - Qna id corresponding to the prompt - if QnaId is present, QnADTO object is ignored.
    QnaID *int32 `json:"qnaId,omitempty"`
    // Qna - QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object
    Qna *PromptDTOQna `json:"qna,omitempty"`
    // DisplayText - Text displayed to represent a follow up question prompt
    DisplayText *string `json:"displayText,omitempty"`
}

type PromptDTOQna

PromptDTOQna qnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object

type PromptDTOQna struct {
    // ID - Unique id for the Q-A.
    ID *int32 `json:"id,omitempty"`
    // Answer - Answer text
    Answer *string `json:"answer,omitempty"`
    // Source - Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs
    Source *string `json:"source,omitempty"`
    // Questions - List of questions associated with the answer.
    Questions *[]string `json:"questions,omitempty"`
    // Metadata - List of metadata associated with the answer.
    Metadata *[]MetadataDTO `json:"metadata,omitempty"`
    // Context - Context of a QnA
    Context *QnADTOContext `json:"context,omitempty"`
    // LastUpdatedTimestamp - Timestamp when the QnA was last updated.
    LastUpdatedTimestamp *string `json:"lastUpdatedTimestamp,omitempty"`
}

type QnADTO

QnADTO q-A object.

type QnADTO struct {
    // ID - Unique id for the Q-A.
    ID *int32 `json:"id,omitempty"`
    // Answer - Answer text
    Answer *string `json:"answer,omitempty"`
    // Source - Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs
    Source *string `json:"source,omitempty"`
    // Questions - List of questions associated with the answer.
    Questions *[]string `json:"questions,omitempty"`
    // Metadata - List of metadata associated with the answer.
    Metadata *[]MetadataDTO `json:"metadata,omitempty"`
    // Context - Context of a QnA
    Context *QnADTOContext `json:"context,omitempty"`
    // LastUpdatedTimestamp - Timestamp when the QnA was last updated.
    LastUpdatedTimestamp *string `json:"lastUpdatedTimestamp,omitempty"`
}

type QnADTOContext

QnADTOContext context of a QnA

type QnADTOContext struct {
    // IsContextOnly - To mark if a prompt is relevant only with a previous question or not.
    // true - Do not include this QnA as search result for queries without context
    // false - ignores context and includes this QnA in search result
    IsContextOnly *bool `json:"isContextOnly,omitempty"`
    // Prompts - List of prompts associated with the answer.
    Prompts *[]PromptDTO `json:"prompts,omitempty"`
}

type QnADocumentsDTO

QnADocumentsDTO list of QnADTO

type QnADocumentsDTO struct {
    autorest.Response `json:"-"`
    // QnaDocuments - List of answers.
    QnaDocuments *[]QnADTO `json:"qnaDocuments,omitempty"`
}

type QnASearchResult

QnASearchResult represents Search Result.

type QnASearchResult struct {
    // Questions - List of questions.
    Questions *[]string `json:"questions,omitempty"`
    // Answer - Answer.
    Answer *string `json:"answer,omitempty"`
    // Score - Search result score.
    Score *float64 `json:"score,omitempty"`
    // ID - Id of the QnA result.
    ID *int32 `json:"id,omitempty"`
    // Source - Source of QnA result.
    Source *string `json:"source,omitempty"`
    // Metadata - List of metadata.
    Metadata *[]MetadataDTO `json:"metadata,omitempty"`
    // Context - Context object of the QnA
    Context *QnASearchResultContext `json:"context,omitempty"`
    // AnswerSpan - Answer span object of QnA with respect to user's question.
    AnswerSpan *QnASearchResultAnswerSpan `json:"answerSpan,omitempty"`
}

type QnASearchResultAnswerSpan

QnASearchResultAnswerSpan answer span object of QnA with respect to user's question.

type QnASearchResultAnswerSpan struct {
    // Text - Predicted text of answer span.
    Text *string `json:"text,omitempty"`
    // Score - Predicted score of answer span.
    Score *float64 `json:"score,omitempty"`
    // StartIndex - Start index of answer span in answer.
    StartIndex *int32 `json:"startIndex,omitempty"`
    // EndIndex - End index of answer span in answer.
    EndIndex *int32 `json:"endIndex,omitempty"`
}

type QnASearchResultContext

QnASearchResultContext context object of the QnA

type QnASearchResultContext struct {
    // IsContextOnly - To mark if a prompt is relevant only with a previous question or not.
    // true - Do not include this QnA as search result for queries without context
    // false - ignores context and includes this QnA in search result
    IsContextOnly *bool `json:"isContextOnly,omitempty"`
    // Prompts - List of prompts associated with the answer.
    Prompts *[]PromptDTO `json:"prompts,omitempty"`
}

type QnASearchResultList

QnASearchResultList represents List of Question Answers.

type QnASearchResultList struct {
    autorest.Response `json:"-"`
    // Answers - Represents Search Result list.
    Answers *[]QnASearchResult `json:"answers,omitempty"`
}

type QueryContextDTO

QueryContextDTO context object with previous QnA's information.

type QueryContextDTO struct {
    // PreviousQnaID - Previous QnA Id - qnaId of the top result.
    PreviousQnaID *int32 `json:"previousQnaId,omitempty"`
    // PreviousUserQuery - Previous user query.
    PreviousUserQuery *string `json:"previousUserQuery,omitempty"`
}

type QueryDTO

QueryDTO POST body schema to query the knowledgebase.

type QueryDTO struct {
    // QnaID - Exact qnaId to fetch from the knowledgebase, this field takes priority over question.
    QnaID *string `json:"qnaId,omitempty"`
    // Question - User question to query against the knowledge base.
    Question *string `json:"question,omitempty"`
    // Top - Max number of answers to be returned for the question.
    Top *int32 `json:"top,omitempty"`
    // UserID - Unique identifier for the user.
    UserID *string `json:"userId,omitempty"`
    // IsTest - Query against the test index.
    IsTest *bool `json:"isTest,omitempty"`
    // ScoreThreshold - Minimum threshold score for answers.
    ScoreThreshold *float64 `json:"scoreThreshold,omitempty"`
    // Context - Context object with previous QnA's information.
    Context *QueryDTOContext `json:"context,omitempty"`
    // RankerType - Optional field. Set to 'QuestionOnly' for using a question only Ranker.
    RankerType *string `json:"rankerType,omitempty"`
    // StrictFilters - Find QnAs that are associated with the given list of metadata.
    StrictFilters *[]MetadataDTO `json:"strictFilters,omitempty"`
    // StrictFiltersCompoundOperationType - Optional field. Set to 'OR' for using OR operation for strict filters. Possible values include: 'AND', 'OR'
    StrictFiltersCompoundOperationType StrictFiltersCompoundOperationType `json:"strictFiltersCompoundOperationType,omitempty"`
    // AnswerSpanRequest - To configure Answer span prediction feature.
    AnswerSpanRequest *QueryDTOAnswerSpanRequest `json:"answerSpanRequest,omitempty"`
}

type QueryDTOAnswerSpanRequest

QueryDTOAnswerSpanRequest to configure Answer span prediction feature.

type QueryDTOAnswerSpanRequest struct {
    // Enable - Enable or Disable Answer Span prediction.
    Enable *bool `json:"enable,omitempty"`
    // ScoreThreshold - Minimum threshold score required to include an answer span.
    ScoreThreshold *float64 `json:"scoreThreshold,omitempty"`
    // TopAnswersWithSpan - Number of Top answers to be considered for span prediction.
    TopAnswersWithSpan *int32 `json:"topAnswersWithSpan,omitempty"`
}

type QueryDTOContext

QueryDTOContext context object with previous QnA's information.

type QueryDTOContext struct {
    // PreviousQnaID - Previous QnA Id - qnaId of the top result.
    PreviousQnaID *int32 `json:"previousQnaId,omitempty"`
    // PreviousUserQuery - Previous user query.
    PreviousUserQuery *string `json:"previousUserQuery,omitempty"`
}

type ReplaceKbDTO

ReplaceKbDTO post body schema for Replace KB operation.

type ReplaceKbDTO struct {
    // QnAList - List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.
    QnAList *[]QnADTO `json:"qnAList,omitempty"`
}

type StrictFiltersCompoundOperationType

StrictFiltersCompoundOperationType enumerates the values for strict filters compound operation type.

type StrictFiltersCompoundOperationType string
const (
    // AND ...
    AND StrictFiltersCompoundOperationType = "AND"
    // OR ...
    OR StrictFiltersCompoundOperationType = "OR"
)

func PossibleStrictFiltersCompoundOperationTypeValues

func PossibleStrictFiltersCompoundOperationTypeValues() []StrictFiltersCompoundOperationType

PossibleStrictFiltersCompoundOperationTypeValues returns an array of possible values for the StrictFiltersCompoundOperationType const type.

type UpdateContextDTO

UpdateContextDTO update Body schema to represent context to be updated

type UpdateContextDTO struct {
    // PromptsToDelete - List of prompts associated with qna to be deleted
    PromptsToDelete *[]int32 `json:"promptsToDelete,omitempty"`
    // PromptsToAdd - List of prompts to be added to the qna.
    PromptsToAdd *[]PromptDTO `json:"promptsToAdd,omitempty"`
    // IsContextOnly - To mark if a prompt is relevant only with a previous question or not.
    // true - Do not include this QnA as search result for queries without context
    // false - ignores context and includes this QnA in search result
    IsContextOnly *bool `json:"isContextOnly,omitempty"`
}

type UpdateKbContentsDTO

UpdateKbContentsDTO PATCH body schema for Update operation in Update Kb

type UpdateKbContentsDTO struct {
    // Name - Friendly name for the knowledgebase.
    Name *string `json:"name,omitempty"`
    // QnaList - List of Q-A (UpdateQnaDTO) to be added to the knowledgebase.
    QnaList *[]UpdateQnaDTO `json:"qnaList,omitempty"`
    // Urls - List of existing URLs to be refreshed. The content will be extracted again and re-indexed.
    Urls *[]string `json:"urls,omitempty"`
    // DefaultAnswer - Default answer sent to user if no good match is found in the KB.
    DefaultAnswer *string `json:"defaultAnswer,omitempty"`
}

type UpdateKbOperationDTO

UpdateKbOperationDTO contains list of QnAs to be updated

type UpdateKbOperationDTO struct {
    // Add - An instance of CreateKbInputDTO for add operation
    Add *UpdateKbOperationDTOAdd `json:"add,omitempty"`
    // Delete - An instance of DeleteKbContentsDTO for delete Operation
    Delete *UpdateKbOperationDTODelete `json:"delete,omitempty"`
    // Update - An instance of UpdateKbContentsDTO for Update Operation
    Update *UpdateKbOperationDTOUpdate `json:"update,omitempty"`
    // EnableHierarchicalExtraction - Enable hierarchical extraction of Q-A from files and urls. The value set during KB creation will be used if this field is not present.
    EnableHierarchicalExtraction *bool `json:"enableHierarchicalExtraction,omitempty"`
    // DefaultAnswerUsedForExtraction - Text string to be used as the answer in any Q-A which has no extracted answer from the document but has a hierarchy. Required when EnableHierarchicalExtraction field is set to True.
    DefaultAnswerUsedForExtraction *string `json:"defaultAnswerUsedForExtraction,omitempty"`
}

type UpdateKbOperationDTOAdd

UpdateKbOperationDTOAdd an instance of CreateKbInputDTO for add operation

type UpdateKbOperationDTOAdd struct {
    // QnaList - List of QNA to be added to the index. Ids are generated by the service and should be omitted.
    QnaList *[]QnADTO `json:"qnaList,omitempty"`
    // Urls - List of URLs to be added to knowledgebase.
    Urls *[]string `json:"urls,omitempty"`
    // Files - List of files to be added to knowledgebase.
    Files *[]FileDTO `json:"files,omitempty"`
}

type UpdateKbOperationDTODelete

UpdateKbOperationDTODelete an instance of DeleteKbContentsDTO for delete Operation

type UpdateKbOperationDTODelete struct {
    // Ids - List of Qna Ids to be deleted
    Ids *[]int32 `json:"ids,omitempty"`
    // Sources - List of sources to be deleted from knowledgebase.
    Sources *[]string `json:"sources,omitempty"`
}

type UpdateKbOperationDTOUpdate

UpdateKbOperationDTOUpdate an instance of UpdateKbContentsDTO for Update Operation

type UpdateKbOperationDTOUpdate struct {
    // Name - Friendly name for the knowledgebase.
    Name *string `json:"name,omitempty"`
    // QnaList - List of Q-A (UpdateQnaDTO) to be added to the knowledgebase.
    QnaList *[]UpdateQnaDTO `json:"qnaList,omitempty"`
    // Urls - List of existing URLs to be refreshed. The content will be extracted again and re-indexed.
    Urls *[]string `json:"urls,omitempty"`
    // DefaultAnswer - Default answer sent to user if no good match is found in the KB.
    DefaultAnswer *string `json:"defaultAnswer,omitempty"`
}

type UpdateMetadataDTO

UpdateMetadataDTO PATCH Body schema to represent list of Metadata to be updated

type UpdateMetadataDTO struct {
    // Delete - List of Metadata associated with answer to be deleted
    Delete *[]MetadataDTO `json:"delete,omitempty"`
    // Add - List of metadata associated with answer to be added
    Add *[]MetadataDTO `json:"add,omitempty"`
}

type UpdateQnaDTO

UpdateQnaDTO PATCH Body schema for Update Qna List

type UpdateQnaDTO struct {
    // ID - Unique id for the Q-A
    ID *int32 `json:"id,omitempty"`
    // Answer - Answer text
    Answer *string `json:"answer,omitempty"`
    // Source - Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs
    Source *string `json:"source,omitempty"`
    // Questions - List of questions associated with the answer.
    Questions *UpdateQnaDTOQuestions `json:"questions,omitempty"`
    // Metadata - List of metadata associated with the answer to be updated
    Metadata *UpdateQnaDTOMetadata `json:"metadata,omitempty"`
    // Context - Context associated with Qna to be updated.
    Context *UpdateQnaDTOContext `json:"context,omitempty"`
}

type UpdateQnaDTOContext

UpdateQnaDTOContext context associated with Qna to be updated.

type UpdateQnaDTOContext struct {
    // PromptsToDelete - List of prompts associated with qna to be deleted
    PromptsToDelete *[]int32 `json:"promptsToDelete,omitempty"`
    // PromptsToAdd - List of prompts to be added to the qna.
    PromptsToAdd *[]PromptDTO `json:"promptsToAdd,omitempty"`
    // IsContextOnly - To mark if a prompt is relevant only with a previous question or not.
    // true - Do not include this QnA as search result for queries without context
    // false - ignores context and includes this QnA in search result
    IsContextOnly *bool `json:"isContextOnly,omitempty"`
}

type UpdateQnaDTOMetadata

UpdateQnaDTOMetadata list of metadata associated with the answer to be updated

type UpdateQnaDTOMetadata struct {
    // Delete - List of Metadata associated with answer to be deleted
    Delete *[]MetadataDTO `json:"delete,omitempty"`
    // Add - List of metadata associated with answer to be added
    Add *[]MetadataDTO `json:"add,omitempty"`
}

type UpdateQnaDTOQuestions

UpdateQnaDTOQuestions list of questions associated with the answer.

type UpdateQnaDTOQuestions struct {
    // Add - List of questions to be added
    Add *[]string `json:"add,omitempty"`
    // Delete - List of questions to be deleted.
    Delete *[]string `json:"delete,omitempty"`
}

type UpdateQuestionsDTO

UpdateQuestionsDTO PATCH Body schema for Update Kb which contains list of questions to be added and deleted

type UpdateQuestionsDTO struct {
    // Add - List of questions to be added
    Add *[]string `json:"add,omitempty"`
    // Delete - List of questions to be deleted.
    Delete *[]string `json:"delete,omitempty"`
}

type WordAlterationsDTO

WordAlterationsDTO collection of word alterations.

type WordAlterationsDTO struct {
    autorest.Response `json:"-"`
    // WordAlterations - Collection of word alterations.
    WordAlterations *[]AlterationsDTO `json:"wordAlterations,omitempty"`
}

Subdirectories

Name Synopsis
..
qnamakerapi