### Hierarchy

- KBService

## Index

### Methods

- addAnswer
- ask
- createGuaribasKbIndex
- deployKb
- getAnswerById
- getAnswerByText
- getFaqBySubjectArray
- getSubjectItems
- importKbPackage
- importKbTabularDirectory
- importKbTabularFile
- importSubjectFile
- sendAnswer
- undeployKbFromStorage
- getFormattedSubjectItems
- getSubjectItemsSeparatedBySpaces

## Methods

### addAnswer

- addAnswer(obj: GuaribasAnswer, cb: GBServiceCallback<GuaribasAnswer>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:92

  #### Parameters

  - ##### obj: GuaribasAnswer

  - ##### cb: GBServiceCallback<GuaribasAnswer>

  #### Returns void

### ask

- ask(instance: IGBInstance, what: string, searchScore: number, subjects: GuaribasSubject[], cb: GBServiceCallback<any>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:100

  #### Parameters

  - ##### instance: IGBInstance

  - ##### what: string

  - ##### searchScore: number

  - ##### subjects: GuaribasSubject[]

  - ##### cb: GBServiceCallback<any>

  #### Returns void

### createGuaribasKbIndex

- createGuaribasKbIndex(cb: any, name: any): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:166

  #### Parameters

  - ##### cb: any

  - ##### name: any

  #### Returns void

### deployKb

- deployKb(core: IGBCoreService, deployer: GBDeployer, localPath: string, cb: GBServiceCallback<any>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:618

  Deploys a knowledge base to the storage using the .gbkb format.

  #### Parameters

  - ##### core: IGBCoreService

  - ##### deployer: GBDeployer

  - ##### localPath: string

    Path to the .gbkb folder.

  - ##### cb: GBServiceCallback<any>

    Package instance or error info.

  #### Returns void

### getAnswerById

- getAnswerById(instanceId: number, answerId: number, cb: GBServiceCallback<GuaribasAnswer>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:54

  #### Parameters

  - ##### instanceId: number

  - ##### answerId: number

  - ##### cb: GBServiceCallback<GuaribasAnswer>

  #### Returns void

### getAnswerByText

- getAnswerByText(instanceId: number, text: string, cb: GBServiceCallback<any>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:69

  #### Parameters

  - ##### instanceId: number

  - ##### text: string

  - ##### cb: GBServiceCallback<any>

  #### Returns void

### getFaqBySubjectArray

- getFaqBySubjectArray(from: string, subjects: any, cb: any): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:324

  #### Parameters

  - ##### from: string

  - ##### subjects: any

  - ##### cb: any

  #### Returns void

### getSubjectItems

- getSubjectItems(instanceId: number, parentId: number, cb: GBServiceCallback<GuaribasSubject[]>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:307

  #### Parameters

  - ##### instanceId: number

  - ##### parentId: number

  - ##### cb: GBServiceCallback<GuaribasSubject[]>

  #### Returns void

### importKbPackage

- importKbPackage(localPath: string, packageStorage: GuaribasPackage, instance: IGBInstance): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:496

  #### Parameters

  - ##### localPath: string

  - ##### packageStorage: GuaribasPackage

  - ##### instance: IGBInstance

  #### Returns void

### importKbTabularDirectory

- importKbTabularDirectory(localPath: string, instance: IGBInstance, packageId: number): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:516

  #### Parameters

  - ##### localPath: string

  - ##### instance: IGBInstance

  - ##### packageId: number

  #### Returns void

### importKbTabularFile

- importKbTabularFile(basedir: string, filename: string, instanceId: number, packageId: number, cb: any): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:368

  #### Parameters

  - ##### basedir: string

  - ##### filename: string

  - ##### instanceId: number

  - ##### packageId: number

  - ##### cb: any

  #### Returns void

### importSubjectFile

- importSubjectFile(packageId: number, filename: string, instance: IGBInstance): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:547

  #### Parameters

  - ##### packageId: number

  - ##### filename: string

  - ##### instance: IGBInstance

  #### Returns void

### sendAnswer

- sendAnswer(conversationalService: IGBConversationalService, session: Session, answer: GuaribasAnswer): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:459

  #### Parameters

  - ##### conversationalService: IGBConversationalService

  - ##### session: Session

  - ##### answer: GuaribasAnswer

  #### Returns void

### undeployKbFromStorage

- undeployKbFromStorage(instance: IGBInstance, packageId: number, cb: GBServiceCallback<any>): void

- - Defined in deploy/kb.gbapp/services/KBService.ts:578

  #### Parameters

  - ##### instance: IGBInstance

  - ##### packageId: number

  - ##### cb: GBServiceCallback<any>

  #### Returns void

### Static getFormattedSubjectItems

- getFormattedSubjectItems(subjects: GuaribasSubject[]): string

- - Defined in deploy/kb.gbapp/services/KBService.ts:290

  #### Parameters

  - ##### subjects: GuaribasSubject[]

  #### Returns string

### Static getSubjectItemsSeparatedBySpaces

- getSubjectItemsSeparatedBySpaces(subjects: GuaribasSubject[]): string

- - Defined in deploy/kb.gbapp/services/KBService.ts:299

  #### Parameters

  - ##### subjects: GuaribasSubject[]

  #### Returns string

Generated using TypeDoc