Skip to content

ChatResult

autogen.ChatResult dataclass #

ChatResult(chat_id=(lambda: int)(), chat_history=list(), summary='', cost=(lambda: {'usage_including_cached_inference': {}, 'usage_excluding_cached_inference': {}})(), human_input=list())

(Experimental) The result of a chat. Almost certain to be changed.

chat_id class-attribute instance-attribute #

chat_id = field(default_factory=lambda: int)

chat id

chat_history class-attribute instance-attribute #

chat_history = field(default_factory=list)

The chat history.

summary class-attribute instance-attribute #

summary = ''

A summary obtained from the chat.

cost class-attribute instance-attribute #

cost = field(default_factory=lambda: {'usage_including_cached_inference': {}, 'usage_excluding_cached_inference': {}})

The cost of the chat. The value for each usage type is a dictionary containing cost information for that specific type. - "usage_including_cached_inference": Cost information on the total usage, including the tokens in cached inference. - "usage_excluding_cached_inference": Cost information on the usage of tokens, excluding the tokens in cache. No larger than "usage_including_cached_inference".

human_input class-attribute instance-attribute #

human_input = field(default_factory=list)

A list of human input solicited during the chat.