model

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	News        *News        `json:"news,omitempty"`
	Image       *Image       `json:"image,omitempty"`
	MiniProgram *MiniProgram `json:"miniprogram,omitempty"`
	Multimsg    []Answer     `json:"multimsg,omitempty"`
}

type AnswerType

type AnswerType = string
const (
	TEXT  AnswerType = "text"
	MUSIC AnswerType = "music"
	NEWS  AnswerType = "news"
)

type AppInfo

type AppInfo struct {
	AppId string `json:"app_id,omitempty"`
	Name  string `json:"name,omitempty"`
}

type Article

type Article struct {
	Title string      `json:"title,omitempty"`
	Desc  string      `json:"description,omitempty"`
	Url   string      `json:"url,omitempty"`
	Pic   string      `json:"picurl,omitempty"`
	Type  ArticleType `json:"type,omitempty"`
}

type ArticleType

type ArticleType = string
const (
	H5 ArticleType = "h5"
	MP ArticleType = "mp"
)

type BidStat

type BidStat struct {
	ErrMsg    string `json:"err_msg,omitempty"`
	CurrTime  string `json:"curr_time,omitempty"`
	LastTime  string `json:"last_time,omitempty"`
	LastValid bool   `json:"last_valid,omitempty"`
	UpRet     int    `json:"up_ret,omitempty"`
}

type DocumentClassify

type DocumentClassify struct {
	L1 string `json:"level1_cls,omitempty"`
	L2 string `json:"level2_cls,omitempty"`
	L3 string `json:"level3_cls,omitempty"`
}

type FmAnsDetail

type FmAnsDetail struct {
	Code         int           `json:"err_code,omitempty"`
	Msg          string        `json:"msg,omitempty"`
	AppInfo      *AppInfo      `json:"app_info,omitempty"`
	Feed         *FmFeed       `json:"feed,omitempty"`
	NodeName     string        `json:"node_name,omitempty"`
	SpeakCommand *SpeakCommand `json:"speak_command,omitempty"`
	PlayCommand  *PlayCommand  `json:"audio_play_command,omitempty"`
}

type FmFeed

type FmFeed struct {
	Cover  string `json:"cover,omitempty"`
	ExtBuf string `json:"ext_buf,omitempty"`
}

type Image

type Image struct {
	MediaId string `json:"media_id,omitempty"`
	Url     string `json:"url,omitempty"`
}

type Message

type Message struct {
	RequestID       uint64  `json:"request_id,omitempty"`
	AnsNodeID       uint64  `json:"ans_node_id,omitempty"`
	AnsNodeName     string  `json:"ans_node_name,omitempty"`
	Article         string  `json:"article,omitempty"`
	Confidence      float64 `json:"confidence,omitempty"`
	Content         string  `json:"content,omitempty"`
	DebugInfo       string  `json:"debug_info,omitempty"`
	Event           string  `json:"event,omitempty"`
	ListOptions     bool    `json:"list_options,omitempty"`
	Opening         string  `json:"opening,omitempty"`
	MsgType         string  `json:"msg_type,omitempty"`
	RespTitle       string  `json:"resp_title,omitempty"`
	SessionID       string  `json:"session_id,omitempty"`
	SceneStatus     string  `json:"scene_status,omitempty"`
	Status          Status  `json:"status,omitempty"`
	TakeOptionsOnly bool    `json:"take_options_only,omitempty"`
	AlbumName       string  `json:"album_name,omitempty"`
	MusicUrl        string  `json:"music_url,omitempty"`
	PicUrl          string  `json:"pic_url,omitempty"`
	SingerName      string  `json:"singer_name,omitempty"`
	SongName        string  `json:"song_name,omitempty"`
}

type MiniProgram

type MiniProgram struct {
	Title        string `json:"title,omitempty"`
	AppID        string `json:"appid,omitempty"`
	PagePath     string `json:"pagepath,omitempty"`
	ThumbMediaID string `json:"thumb_media_id,omitempty"`
	ThumbUrl     string `json:"thumb_url,omitempty"`
}

type MoreInfo

type MoreInfo struct {
	Music string `json:"music_ans_detail,omitempty"`
	Fm    string `json:"fm_ans_detail,omitempty"`
}

type MusicAnsDetail

type MusicAnsDetail struct {
	Code         int           `json:"code,omitempty"`
	Msg          string        `json:"msg,omitempty"`
	Feed         *MusicFeed    `json:"feed,omitempty"`
	PlayCommand  *PlayCommand  `json:"play_command,omitempty"`
	SpeakCommand *SpeakCommand `json:"speak_command,omitempty"`
}

type MusicFeed

type MusicFeed struct {
	ExtBuf string `json:"ext_buf,omitempty"`
}

type NLUResult

type NLUResult struct {
	RequestID           uint64              `json:"request_id,omitempty"`
	Ret                 int                 `json:"ret,omitempty"`
	AnsNodeID           uint64              `json:"ans_node_id,omitempty"`
	AnsNodeName         string              `json:"ans_node_name,omitempty"`
	SessionID           string              `json:"session_id,omitempty"`
	SceneStatus         string              `json:"scene_status,omitempty"`
	Title               string              `json:"title,omitempty"`
	Answer              string              `json:"answer,omitempty"`
	AnswerOpen          int                 `json:"answer_open,omitempty"`
	AnswerType          AnswerType          `json:"answer_type,omitempty"`
	Article             string              `json:"article,omitempty"`
	Confidence          float64             `json:"confidence,omitempty"`
	CreateTime          json.Number         `json:"create_time,omitempty"`
	DialogSessionStatus string              `json:"dialog_session_status,omitempty"`
	DialogStatus        string              `json:"dialog_status,omitempty"`
	Event               string              `json:"event,omitempty"`
	IntentConfirmStatus string              `json:"intent_confirm_status,omitempty"`
	ListOptions         bool                `json:"list_options,omitempty"`
	MsgID               string              `json:"msg_id,omitempty"`
	Opening             string              `json:"opening,omitempty"`
	Msg                 []Message           `json:"msg,omitempty"`
	FromUserName        string              `json:"from_user_name,omitempty"`
	ToUserName          string              `json:"to_user_name,omitempty"`
	Status              Status              `json:"status,omitempty"`
	SlotInfo            []map[string]string `json:"slot_info,omitempty"`
	Slots               []Slot              `json:"slots_info,omitempty"`
	TakeOptionsOnly     bool                `json:"take_options_only,omitempty"`
	Query               string              `json:"query,omitempty"`
	BidStat             *BidStat            `json:"bid_stat,omitempty"`
	MoreInfo            *MoreInfo           `json:"more_info,omitempty"`
}

type Ner

type Ner struct {
	Type NerType         `json:"type,omitempty"`
	Span []int           `json:"span,omitempty"`
	Text string          `json:"text,omitempty"`
	Norm json.RawMessage `json:"norm,omitempty"`
}

type NerNorm

type NerNorm struct {
	Year   int    `json:"year,omitempty"`
	Month  int    `json:"month,omitempty"`
	Day    int    `json:"day,omitempty"`
	Hour   int    `json:"hour,omitempty"`
	Minute int    `json:"minute,omitempty"`
	Second int    `json:"second,omitempty"`
	Repeat string `json:"repeat,omitempty"`
}

type NerType

type NerType = string
const (
	NUMBER_NER            NerType = "number"
	DATETIME_POINT_NER    NerType = "datetime_point"
	DATETIME_INTERVAL_NER NerType = "datetime_interval"
	DATETIME_DURATION_NER NerType = "datetime_duration"
	DATETIME_REPEAT_NER   NerType = "datetime_repeat"
)

type News

type News struct {
	Articles []Article `json:"articles,omitempty"`
}

type NewsAbstraction

type NewsAbstraction struct {
	Abstraction    string  `json:"abstraction,omitempty"`
	Classification bool    `json:"classification,omitempty"`
	Prob           float64 `json:"prob,omitempty"`
}

type PlayCommand

type PlayCommand struct {
	CanPreGetFront    bool       `json:"can_pre_get_front,omitempty"`
	NeedGetHistory    bool       `json:"need_get_history,omitempty"`
	NeedPreGet        bool       `json:"need_pre_get,omitempty"`
	Recoverable       bool       `json:"recoverable,omitempty"`
	RepeatModeSupport int        `json:"repeat_mode_support,omitempty"`
	Type              int        `json:"type,omitempty"`
	Playlist          []PlayInfo `json:"play_list,omitempty"`
}

type PlayInfo

type PlayInfo struct {
	Id          string `json:"id,omitempty"`
	AlbumId     string `json:"album_id,omitempty"`
	AlbumName   string `json:"album_name,omitempty"`
	AlbumPicUrl string `json:"album_pic_url,omitempty"`
	Author      string `json:"author,omitempty"`
	Mid         string `json:"mid,omitempty"`
	Name        string `json:"name,omitempty"`
	Url         string `json:"url,omitempty"`
}

type Rank

type Rank struct {
	Question string  `json:"question,omitempty"`
	Score    float64 `json:"score,omitempty"`
}

type RankResult

type RankResult struct {
	List       []Rank `json:"results,omitempty"`
	ExactMatch bool   `json:"exact_match,omitempty"`
}

type SimilarQuery

type SimilarQuery struct {
	Question string  `json:"question,omitempty"`
	Score    float64 `json:"score,omitempty"`
	Source   string  `json:"source,omitempty"`
}

type Slot

type Slot struct {
	AllNerTypes   string `json:"all_ner_types,omitempty"`
	ConfirmStatus string `json:"confirm_status,omitempty"`
	Start         int    `json:"start,omitempty"`
	End           int    `json:"end,omitempty"`
	EntityType    string `json:"entity_type,omitempty"`
	Norm          string `json:"norm,omitempty"`
	NormDetail    string `json:"norm_detail,omitempty"`
	SlotName      string `json:"slot_name,omitempty"`
	SlotValue     string `json:"slot_value,omitempty"`
}

type SpeakCommand

type SpeakCommand struct {
	Type int    `json:"speak_type,omitempty"`
	Text string `json:"text,omitempty"`
}

type Status

type Status = string
const (
	FAQ         Status = "FAQ"
	NOMATCH     Status = "NOMATCH"
	CONTEXT_FAQ Status = "CONTEXT_FAQ"
	GENERAL_FAQ Status = "GENERAL_FAQ"
)

type TokenizeResult

type TokenizeResult struct {
	Words       []string `json:"words,omitempty"`
	POSs        []int    `json:"POSs,omitempty"`
	WordsMix    []string `json:"words_mix,omitempty"`
	POSsMix     []int    `json:"POSs_mix,omitempty"`
	Entities    []string `json:"entities,omitempty"`
	EntityTypes []int    `json:"entity_types,omitempty"`
}

type User

type User struct {
	ID     string `json:"userid"`
	Name   string `json:"username"`
	Avatar string `json:"avatar"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL