codekingpro/portable-devtools
114k
1"""**Chat Sessions** are a collection of messages and function calls."""2 3from collections.abc import Sequence4from typing import TypedDict5 6from langchain_core.messages import BaseMessage7 8 9class ChatSession(TypedDict, total=False):10 """Chat Session.11 12 Chat Session represents a single conversation, channel, or other group of messages.13 """14 15 messages: Sequence[BaseMessage]16 """A sequence of the LangChain chat messages loaded from the source."""17 18 functions: Sequence[dict]19 """A sequence of the function calling specs for the messages."""20 