The base component of a conversation is utterance.
Kovot provides Message
and Response
classes to represent utterances.
Message
class represents user utterance.
It is generated by taking text
as an argument
from kovot import Message
msg = Message(text="This is utterance.")
Message
class optionally takes Speaker
object which represents a speaker of the utterance.
from kovot import Speaker
msg = Message(text="This is utterance",
speaker=Speaker(name="Speaker name"))
Response
class represents system response to user utterance.
Response
class takes two arguments;
text
as a sentence of the responsescore
as a appropriateness
from kovot import Response
res = Response(text="This is a response", score=1.0)
Like Message
, Resposne
class takes following arguments as well as speaker
.
message
corresponding to the responsesource
as aMod
name generating the response
res = Response(text="This is a response",
score=1.0,
message=msg,
source="source name")