-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Participant #526
Participant #526
Conversation
LGTM 🚀
|
packages/core/src/expander.ts
Outdated
@@ -111,6 +111,7 @@ async function callExpander( | |||
let functions: ChatFunctionCallback[] = [] | |||
let fileMerges: FileMergeHandler[] = [] | |||
let outputProcessors: PromptOutputProcessorHandler[] = [] | |||
let chatParticipants: ChatParticipantHandler[] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chatParticipants
parameter should be placed after aici
to match the order in the function signature.
generated by genaiscript pr-review-commit
- Be concise. | ||
- Use simple language. | ||
- use emojis. | ||
` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you structure the output to jsonl format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh good one. let me see if i can add support for JSONL in outputs.
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