mirror of
https://github.com/leon-ai/leon.git
synced 2024-11-24 04:31:31 +03:00
fix(bridge/nodejs): usage of types from server/core/brain/types
This commit is contained in:
parent
673cf0426f
commit
2cb030f47b
@ -1,25 +1,12 @@
|
||||
/**
|
||||
* Action types
|
||||
*/
|
||||
import type { ActionParams, IntentObject } from '@/core/brain/types'
|
||||
|
||||
export type { ActionParams, IntentObject }
|
||||
|
||||
export interface ActionParams {
|
||||
lang: string
|
||||
utterance: string
|
||||
current_entities: unknown[] // TODO
|
||||
entities: unknown[] // TODO
|
||||
current_resolvers: unknown[] // TODO
|
||||
resolvers: unknown[] // TODO
|
||||
slots: Record<string, unknown>[] // TODO
|
||||
}
|
||||
export type ActionFunction = (params: ActionParams) => Promise<void>
|
||||
|
||||
export interface IntentObject extends ActionParams {
|
||||
id: string
|
||||
domain: string
|
||||
skill: string
|
||||
action: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Answer types
|
||||
*/
|
||||
|
@ -45,12 +45,8 @@ export enum SkillActionTypes {
|
||||
Dialog = 'dialog'
|
||||
}
|
||||
|
||||
export interface IntentObject {
|
||||
id: string
|
||||
export interface ActionParams {
|
||||
lang: ShortLanguageCode
|
||||
domain: NLPDomain
|
||||
skill: NLPSkill
|
||||
action: NLPAction
|
||||
utterance: NLPUtterance
|
||||
current_entities: NEREntity[]
|
||||
entities: NEREntity[]
|
||||
@ -59,6 +55,13 @@ export interface IntentObject {
|
||||
slots: { [key: string]: NLUSlot['value'] | undefined }
|
||||
}
|
||||
|
||||
export interface IntentObject extends ActionParams {
|
||||
id: string
|
||||
domain: NLPDomain
|
||||
skill: NLPSkill
|
||||
action: NLPAction
|
||||
}
|
||||
|
||||
export interface BrainProcessResult extends NLUResult {
|
||||
speeches: string[]
|
||||
executionTime: number
|
||||
|
Loading…
Reference in New Issue
Block a user