executeChatSession function in chat.ts now accepts chatParticipants as an additional parameter.
callExpander function in expander.ts now initializes and includes chatParticipants in its return object.
expandTemplate function in expander.ts now includes chatParticipants in its processing logic.
createPromptContext function in promptcontext.ts now provides a defChatParticipant method to define a chat participant.
PromptNode interface in promptdom.ts has a new type "chatParticipant" to represent chat participant nodes.
createChatParticipant function in promptdom.ts creates a new PromptChatParticipantNode.
renderPromptNode function in promptdom.ts now handles chatParticipant nodes and includes them in the PromptNodeRender interface.
runTemplate function in promptrunner.ts now includes chatParticipants in its execution flow.
createRunPromptContext function in runpromptcontext.ts now supports chatParticipants and includes them in the execution context.
CLI Changes
None of the changes directly affect the CLI interface; all changes are internal to the library's handling of chat participants within the code execution flow.
Library Changes
ChatParticipantHandler
which is a function that takes an array ofChatCompletionMessageParam
and returns aPromise<string>
.chatParticipants
as an array ofChatParticipantHandler
in various parts of the codebase:executeChatSession
function inchat.ts
now acceptschatParticipants
as an additional parameter.callExpander
function inexpander.ts
now initializes and includeschatParticipants
in its return object.expandTemplate
function inexpander.ts
now includeschatParticipants
in its processing logic.createPromptContext
function inpromptcontext.ts
now provides adefChatParticipant
method to define a chat participant.PromptNode
interface inpromptdom.ts
has a new type"chatParticipant"
to represent chat participant nodes.createChatParticipant
function inpromptdom.ts
creates a newPromptChatParticipantNode
.renderPromptNode
function inpromptdom.ts
now handleschatParticipant
nodes and includes them in thePromptNodeRender
interface.runTemplate
function inpromptrunner.ts
now includeschatParticipants
in its execution flow.createRunPromptContext
function inrunpromptcontext.ts
now supportschatParticipants
and includes them in the execution context.CLI Changes