-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add Chat Message Handling #1218
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const execution_order = this._getExecutionOrder(parentRunId); | ||
const session = this.session as TracerSession; | ||
const convertedMessages = messages.map((batch) => | ||
batch.map((message) => ({ |
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 python message format looks like
{
"_type": "human|ai|system",
"content": "the text",
"example": false, // only used for PALM currently?
"additional_kwargs": {} // not sure when this is ever used either
}
if (!handler.ignoreLLM) { | ||
try { | ||
if (handler.handleChatModelStart) | ||
await handler.handleChatModelStart?.( |
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.
I'm sure we could make this more concise with some ternary ops or better use of conditional chaining...
c0fd92d
to
3b3c62a
Compare
3b3c62a
to
af34fe5
Compare
af34fe5
to
b771089
Compare
handleChatModelStart
to callback handler and managerhandleLLMStart
if not implementedStill needs tests - will add tomorrow